You can create a dual-axis line chart in Excel to compare two different data sets with different units on a single visual, such as Sales Revenue vs. Customer Satisfaction Score. This is done by creating a standard line chart and then formatting the secondary axis through the chart options menu. The process involves selecting your data, inserting the chart type, and then right-clicking a data series to assign it to the "Secondary Axis" option.
What You'll Need
- A computer with Microsoft Excel installed (any recent version, such as Excel 2016, 2019, or Microsoft 365).
- Two columns of numerical data representing the two different metrics you wish to compare (e.g., one for currency, one for a percentage or score).
- A basic understanding of how to navigate Excel's ribbon interface and right-click context menus.
Step-by-Step
- Prepare your data layout. For the chart to recognize the two axes automatically, ensure your data is arranged in a standard table format. The first column should contain the labels (e.g., Months or Quarters), and the next two columns should contain the numerical values for your two data series. Do not merge cells or add headers inside the data range itself; list your headers at the very top of the columns.
- Select your data. Click and drag your mouse to highlight the entire data range, including the headers. It is safest to include the column letters at the top and the row numbers on the left to ensure Excel captures the entire dataset.
- Insert the initial chart. Go to the top menu and click the Insert tab. In the Charts section, look for the Insert Line or Area Chart icon. A dropdown menu will appear; select the first option, which is typically the standard Line chart. Excel will generate a basic chart using the first column as the X-axis and the first numerical column as the primary Y-axis.
- Identify the secondary data series. In the generated chart, determine which of your two lines corresponds to the second data series you want on the secondary axis. This is the line you will modify next.
- Open the Format Data Series menu. Right-click directly on that specific line in the chart. From the context menu that appears, select Format Data Series. This will open a pane on the right side of the Excel window specifically for formatting that line.
- Assign the Secondary Axis. In the Format Data Series pane, look for the Series Options category (usually the first one). Find the dropdown menu labeled Axis. Click on it and select Secondary Axis. You will immediately see the second line change to the right side of the chart, with its own vertical axis and scale.
- Format the Secondary Axis. It is often helpful to remove the gridlines or axis labels for the secondary axis if they clutter the view. To do this, click on the numbers on the right side of the chart (the secondary Y-axis). Press the Delete key on your keyboard. You can also double-click the remaining axis to adjust the number format (e.g., changing a percentage to a decimal) or remove the border lines for a cleaner look.
- Customize the chart title and legend. Click on the chart title at the top to rename it (e.g., "Monthly Performance Review"). Ensure the legend at the top or bottom clearly identifies which line represents which metric. If the default colors are confusing, you can change the fill color or line style for each series by right-clicking them and selecting "Format Data Series." This ensures viewers can instantly distinguish between the two data sets.
Common Mistakes
One of the most frequent errors users make is attempting to create a dual-axis chart using a Pie chart or Bar chart. While you can technically add a secondary axis to a bar chart, a line chart is visually superior for comparing trends over time, as lines effectively show the direction and rate of change. Another mistake is failing to sort the data before plotting. If your X-axis labels are not in the correct order (e.g., chronological order for months), the chart will look jumbled and misleading. Always ensure your data is sorted correctly before inserting the chart.
Tips
When creating a dual-axis chart, it is good practice to place the data series with the larger numbers on the primary axis and the smaller numbers on the secondary axis. This helps prevent the smaller numbers from being squashed into the top corner of the chart where they are hard to read. Additionally, consider removing the vertical gridlines entirely; they often serve no purpose in dual-axis charts and can make the visual cluttered. Finally, ensure your axis scales are logical. If you have a massive spike in one data set, the secondary axis will scale down the other data set, potentially distorting the visual comparison. In such cases, you may need to break the axis or use a logarithmic scale, though these are more advanced modifications.
Troubleshooting
If the secondary axis option is grayed out and unselectable in the Format Data Series menu, it usually means Excel did not recognize your data as two separate series. This often happens if the data is not contiguous, if there are blank cells in the middle of your data range, or if the headers are not at the very top of the columns. Try clearing any blank rows between your data, or select the data in a way that Excel clearly sees two distinct columns of numbers. If the chart is not updating automatically when you change a number in your spreadsheet, check that "Automatic Chart Updating" is enabled. You can do this by clicking the chart, going to the Design tab in the ribbon, and looking for the Refresh button, or by ensuring that the "Chart Filters" dropdown is not filtering out the specific data series you are trying to view.
Frequently Asked Questions
Can I use a secondary axis for a Bar Chart?
Yes, you can assign a secondary axis to a bar chart in Excel. Right-click the bar you want to move to the secondary axis and select "Format Data Series," then choose "Secondary Axis" from the Axis dropdown menu.
Why is my secondary axis number format different?
Excel automatically assigns the default number format of the first data series to the primary axis and the format of the second data series to the secondary axis. If your two data series have different units (e.g., one in currency and one in percentages), the number formatting will naturally differ.
How do I remove the secondary axis labels?
To remove the labels, simply click on the text on the right side of the chart. Press the Delete key on your keyboard. This will remove the numbers and the horizontal axis line for that side of the chart.
Can I have more than two axes in Excel?
Standard Excel charts only support one primary and one secondary axis. If you need to compare more than two distinct data sets with very different scales, you must use a combination chart type that includes a third data series as a scatter plot or a line with markers, rather than a standard line chart.
Does the secondary axis affect the X-axis?
No, the secondary axis only affects the vertical (Y) scale of the chart. The horizontal (X) axis remains the same for both the primary and secondary data series, representing the labels (categories) you selected.
My chart is too cluttered; how can I clean it up?
To clean a cluttered chart, consider removing the vertical gridlines, hiding the secondary axis labels, and simplifying the legend. You can also try changing the data series to a "Line with Markers" style to make individual data points easier to see without cluttering the area between the lines.