Excel launched for the Macintosh on September 30, 1985, combining spreadsheet calculations with business graphics. That combination made it possible to work through a sales report and chart its results in one application. A line graph remains a useful way to follow those results over time, including monthly dips that a starting and ending total would miss.
Today, collaborative data platforms offer another way to develop those analyses. In Deepnote, teams can ask Deepnote Agent to prepare the data and create a chart, then refine it through follow-up requests with the underlying calculations available for review.
We’ll start with a line graph in Excel, then add another series, fix date spacing, and examine smoothing and secondary axes. After the Excel walkthrough, we’ll use Deepnote Agent to build an interactive revenue chart from a single request.
Make a line chart in Excel in four steps
Our fictional retailer tracks monthly online revenue, partner revenue, and online orders. Revenue is in US dollars; orders are counts. Each date identifies the month whose total appears in that row, so January 1 represents all of January, not one day's sales.
Month | Online revenue | Partner revenue | Online orders |
|---|---|---|---|
2026-01-01 | 120000 | 80000 | 1000 |
2026-02-01 | 150000 | 85000 | 1100 |
2026-03-01 | 140000 | 95000 | 1050 |
2026-04-01 | 180000 | 100000 | 1300 |
2026-05-01 | 170000 | 110000 | 1250 |
2026-06-01 | 210000 | 120000 | 1500 |
The instructions cover Excel for the web, with desktop steps where controls differ. Desktop-only settings are identified in their sections. The final Deepnote walkthrough includes an interactive version of the two-channel revenue comparison.
1. Prepare the dates and values
Paste the table into Excel with one reporting period per row. Keep the amounts numeric and sort the entire table by Month, oldest to newest. Sorting only the date column would detach the dates from their values.
Use real Excel dates, then format them as mmm yyyy if you prefer labels such as Jan 2026. If the pasted dates remain text, use the conversion steps in the dates section below before charting.
2. Select one series
Select Month and Online revenue, including the headings and six data rows. Leave Partner revenue and Online orders out of this first chart.
A series is one set of values plotted together. Here, it is the six monthly online-revenue totals.
3. Insert Line with Markers
In Excel for the web, open Insert, find the line-chart options, and choose Line with Markers. On desktop, use Insert > Insert Line or Area Chart > Line with Markers under the 2-D Line options.
Choose the ordinary line option, not Stacked Line. A stacked line adds series cumulatively, which would change the meaning of the comparison once we add partner revenue.
4. Name the chart and check the axes
Use Online revenue by month, January to June 2026 as the title and Revenue (USD) for the vertical axis. Check that the horizontal labels identify the six months in order.
In Excel for the web, select the chart and open Chart > Format to edit the title. Select an axis to open its settings. On desktop, use Chart Design > Add Chart Element for chart and axis titles.
Markers help distinguish the recorded monthly totals from the lines joining them. Leave individual data labels off this first view unless readers need exact amounts printed beside the points.
Online revenue ends higher than it starts, but the increase is uneven: March and May both fall below the previous month. The line preserves those setbacks, which a January-versus-June comparison would hide.
Add multiple series to one line chart
To compare the two revenue channels, select Month, Online revenue, and Partner revenue, then insert another Line with Markers chart. Both revenue series belong on the same dollar axis.
To add the partner series to your existing chart, open Select Data. In the web task pane, expand Data > Source to include the first three columns. On desktop, use Chart Design > Select Data and expand the chart's data range.
Check the result before changing its appearance:
- The horizontal axis should contain months. The legend should identify the two revenue channels. If those are reversed, use Data > Source > Data Fields split by in the web chart pane and choose columns. On desktop, use Chart Design > Switch Row/Column.
- Keep the reporting periods aligned. Each row must compare the same month for both channels. A missing month's value should not cause the later values to slide into the wrong rows.
Online revenue is higher throughout the period, but partner revenue rises every month. The combined view makes the different patterns visible without treating the channels as though they have the same starting value.
If you add more regions or products, stop when the lines become difficult to follow. We would highlight the series under discussion and mute the others, or give each series a small chart with consistent scales. Shrinking the legend rarely solves the underlying problem.
Smooth lines vs. straight lines
A curved line can make a chart look less angular. It can also suggest a smooth progression that the observations never measured.
For monthly totals, we prefer straight segments with markers. Even a straight connection is only a guide between observations; it does not tell us what happened each day within the month.
Turn smoothing on or off
In desktop Excel, select the series and open Format Data Series > Fill & Line > Line. Select or clear Smoothed line. Repeat for each series you want to change.
Keep straight lines if the web version you are using does not expose this control. Smoothing is optional formatting, not a requirement for a finished chart.
Both versions use the same six monthly totals. Curving the connectors changes their appearance without adding observations between the months. We cannot use those curves to determine when revenue began to fall or recover.
We would be particularly cautious with sparse observations, abrupt changes, or thresholds. A curved connector can imply a turning point between measurements. Do not read that implied point as an observed maximum or minimum.
A moving average changes the calculation
A moving average is different from the Smoothed line setting. It calculates a new series from neighboring observations.
For example, a trailing three-month average for June uses April, May, and June. Here, that is about $186,667, compared with June's recorded $210,000. The average reduces month-to-month fluctuation and responds more slowly to a recent increase.
In desktop Excel, select the online-revenue series, choose Chart Design > Add Chart Element > Trendline > More Trendline Options, then select Moving Average and set Period to 3. Label it Three-month moving average and keep the original series visible.
Use this only after checking that each observation covers one month and that the months are consecutive. Three points do not necessarily represent three months in an irregularly sampled dataset.
Fix dates on the x-axis
Excel line charts use a category axis horizontally. That axis can be a text axis, which spaces categories evenly, or a date axis, which uses calendar intervals. The distinction matters when observations are missing or unevenly spaced.
Check whether the dates are stored as text
Changing a cell's appearance to Date does not necessarily convert a text value into an Excel date.
If the first date is in A2, test it with =ISNUMBER(A2). Excel stores dates as numbers, so FALSE tells us that the cell is not currently a numeric date. TRUE is only a first check: an unrelated number would also pass.
For text in the exact YYYY-MM-DD format used in our table, a helper column can convert it explicitly:
=DATE(LEFT(A2,4),MID(A2,6,2),RIGHT(A2,2))
Fill the formula down, format the results as dates, and check them against the source. This formula is specific to that format. For other formats, use a conversion that matches the source's day, month, and year order; an ambiguous date such as 03/04/2026 needs that context.
Use the converted dates for the chart and sort the complete rows chronologically. Avoid replacing the date column with month-name text if the report spans more than one year.
Choose calendar spacing deliberately
On desktop, select the horizontal axis and open Format Axis > Axis Options > Axis Type > Date axis. For our monthly report, choose Months as the base unit. Use Days when day-level spacing matters.
Suppose we temporarily remove March, April, and May from the example. A text axis can place January, February, and June at equal distances. A date axis preserves the longer interval before June.
The date-spaced view fixes the timing, but a line drawn directly from February to June still hides the missing observations. In the final panel, we restore the missing months as rows with empty revenue values and leave a visible gap.
These three months were deliberately withheld for the demonstration. The full source table above contains their values.
Keep missing values separate from zero
Zero means there was no revenue. An empty observation means we do not have a value. Replacing the second with the first invents a drop in the business.
For a standard desktop line chart, open Chart Design > Select Data > Hidden and Empty Cells and choose Gaps for genuinely empty cells. The same dialog can show zero or connect points, so check the selected behavior before sharing.
Keep a row for every expected reporting period. If a month is absent from the table altogether, a gap setting has no blank value to act on. Also check formula-generated blanks separately: a formula returning "" is not a genuinely empty cell and may behave differently.
Use a scatter chart for numerical x-values
If the x-axis represents distance, dosage, elapsed seconds, or another numerical measurement, plot the paired values with a scatter chart.
Use Scatter with Straight Lines and Markers when connecting those measurements is meaningful. Supply the paired x- and y-values. If the observations follow an increasing numerical sequence, sort the complete rows by x before connecting them. For measurements from unrelated items, use markers alone.
Scatter is also useful for irregular timestamps where hours or minutes matter. Excel's line-chart date axis uses days, months, or years; an XY value axis gives finer control over numerical date-and-time values. Daily or monthly dates do not automatically require a scatter chart.
Add a secondary axis, and know when to avoid it
If you only need to compare a few categories in one period, compare each measure in a separate bar graph.
Revenue and order count use different units. Plotting both on one numerical scale would flatten the order-count line because its values are much smaller. A secondary axis gives each measure its own scale, but those independent scales can also make the lines appear more closely aligned.
We would use two clearly labeled panels when the goal is to compare how the measures change over time. If a single chart needs two axes, label both units and check how the axis limits affect the apparent relationship. Our guide to misleading graphs explains how scale choices can change that impression.
Add the axis in desktop Excel
Create a chart containing Month, Online revenue, and Online orders. A small chart-input range with those three adjacent columns makes the selection straightforward.
Select the Online orders series, open Format Data Series > Series Options, and choose Secondary Axis. Label the left axis Online revenue (USD) and the right axis Online orders (count). Keep the series clearly identified and inspect both axis ranges.
These secondary-axis instructions use desktop Excel. The available web controls can differ, so do not assume a desktop menu path exists in the browser.
Try separate panels before keeping two scales
We would usually put revenue and order count in two vertically aligned charts with the same dates. Each gets its own labeled value scale, and readers can follow both without switching between left and right axes.
Both measures fall in March and May, then reach their highest recorded values in June. To investigate the revenue increase, we can divide online revenue by online orders. Revenue per order rises from $120 in January to $140 in June, while the number of orders rises from 1,000 to 1,500.
For a relative-growth comparison, another option is to set each series' starting value to 100 and plot the resulting indexes on one axis. Label that transformation: readers would be comparing growth from the starting month, not dollars or order counts.
Create a line graph faster with Deepnote Agent
The Excel walkthrough involved selecting series, checking date types, and adjusting how the chart handles missing observations. Deepnote Agent can handle those tasks together from a written request, with the code available in a collaborative notebook for review.
You can start with our line graph maker or work directly in a Deepnote project. Here, we’ll upload the Excel workbook used above and ask Deepnote Agent to create the chart from the source data.
After uploading the workbook, ask Agent:
Use the uploaded Excel workbook to analyze monthly revenue from January through June 2026. Find the original table containing Month, Online revenue, Partner revenue, and Online orders. Use that table once, without combining copies or demonstration worksheets that omit months.
Parse the dates, sort them chronologically, and check for missing months and duplicate dates. Each row represents a whole reporting month.
Create an interactive line graph of Online revenue and Partner revenue. Use straight lines with markers, purple for Online and teal for Partner. Put both channels on one axis labeled “Revenue (USD),” ranging from $0 to $230,000. Label the months Jan through Jun and title the chart “Monthly revenue by channel, January to June 2026.” Keep Online orders out of this revenue chart. Do not smooth the lines or add a trendline.
Show a summary table with both channels and combined revenue for each month. Briefly explain the monthly declines, which channel grows consistently, and how combined revenue changes from January to June.
The interactive chart below shows the two channels on a shared dollar scale. Online revenue remains higher throughout the period, but falls in March and May. Partner revenue rises every month.
To examine the broader trend, ask: “Add a trailing three-month moving average for Online revenue, keep the original observations visible, and label the new series.” Agent can update the calculation and chart together.
For transaction data, Agent can parse dates and sum revenue by calendar month and channel before plotting. Missing records still need careful interpretation: an absent month should become zero only when the source confirms that the period is complete and no sales occurred. The notebook keeps those preparation steps alongside the chart so the team can inspect and revise them.
If you’re still deciding which chart suits the question, use the AI chart generator to describe what you want to compare.