Excel Graph with Two X Axis: How to Create a Secondary Axis
In this article
To make an Excel graph with two axes (specifically a secondary Y-axis to accompany the X-axis), you must move one of your data series to a "Secondary Axis." This is achieved by right-clicking the data series you want to change and selecting Format Data Series, then choosing Secondary Axis. This allows you to plot two different data sets with different scales—such as temperature and rainfall—on the same chart without one flattening the other.
What You'll Need
- Microsoft Excel (Desktop version recommended for full formatting options).
- A data table containing at least two sets of numerical data that share a common X-axis (e.g., dates, months, or categories).
- Data that varies significantly in scale (e.g., one set is in the hundreds and the other is in the millions).
Step-by-Step
- Prepare Your Data: Organize your data in columns. Place your X-axis labels (the common denominator, like dates) in the leftmost column, and your two different data series in the adjacent columns.
- Insert a Basic Chart: Highlight all your data, including the headers. Go to the Insert tab on the top ribbon. Select a Clustered Column or Line chart. At this stage, the chart will likely look wrong because the data with the smaller values will appear as a flat line at the bottom.
- Select the Secondary Data Series: Find the data series that is barely visible or looks disproportionate. Right-click directly on that specific line or bar in the chart area. (Note: If the line is too small to click, go to the Chart Format tab, click the dropdown menu under Current Selection in the top left, and select the specific series name).
- Activate the Secondary Axis: In the right-click menu, select Format Data Series. A pane will appear on the right side of the screen. Under Series Options (the icon that looks like a small bar chart), select the radio button for Secondary Axis.
- Change the Chart Type (Optional but Recommended): Having two sets of bars often leads to them overlapping and hiding one another. To fix this, right-click the secondary series again and select Change Series Chart Type. In the window that appears, ensure the Combo category is selected. Set your primary series to Clustered Column and your secondary series to Line.
- Label Your Axes: Because you now have two vertical axes, you must label them so the viewer knows which is which. Click the Chart Elements button (the green plus sign + next to the chart). Check the box for Axis Titles. Click and edit the text for both the Primary Vertical axis (left) and the Secondary Vertical axis (right).
- Adjust the Scales: If the axes do not start at zero or have awkward increments, right-click the axis numbers on the left or right and select Format Axis. Under Axis Options, you can manually set the Minimum and Maximum bounds.
Common Mistakes
- Using the wrong chart type: Trying to use two sets of "Clustered Columns" on a secondary axis often results in the bars overlapping perfectly, making the primary data invisible. Always use a "Combo" chart (Column + Line) for clarity.
- Forgetting Axis Labels: Without labels, a viewer cannot tell which data series belongs to the left axis and which belongs to the right, rendering the graph misleading.
- Overcomplicating the Data: Adding three or more axes is not natively supported in a simple way in Excel and usually makes a graph unreadable. Stick to two.
Tips
- Color Coordination: Match the color of your axis font to the color of the data line it represents. For example, if your secondary line is red, make the right-side axis text red. This provides an instant visual cue to the reader.
- Clean Up Gridlines: When using two axes, the horizontal gridlines are based on the primary axis. If the secondary axis doesn't align with these lines, it can look messy. You can remove the gridlines entirely via Chart Elements for a cleaner look.
- Use the "Combo" Shortcut: Instead of creating a chart and then moving the axis, you can go to Insert > Recommended Charts > All Charts > Combo. This allows you to assign the secondary axis and the chart type for both series in one single window.
Troubleshooting
If you cannot click the data series to format it: This usually happens when the values are so small they are practically invisible. Go to the Format tab on the ribbon, look for the Current Selection dropdown menu in the top-left corner, and select the name of the series from the list. This will force the selection of that series regardless of its size on the screen.
If the secondary axis does not appear: Ensure you are using a 2D chart. Secondary axes are not supported in 3D chart types. If you have a 3D chart, change it to a 2D version via Change Chart Type.
If the data looks distorted: Check your data for "text" formatted as numbers. If Excel treats a number as text, it will not plot correctly on the axis. Highlight your data, go to the Home tab, and ensure the format is set to Number.
Frequently Asked Questions
Can I have two different X-axes (horizontal)?
No, Excel does not natively support two separate horizontal X-axes on a single plot area. You can have multiple Y-axes (vertical), but all series must share the same X-axis categories or timeline.
Why does my data disappear when I click Secondary Axis?
The data hasn't disappeared; it has simply shifted to a new scale. If the secondary axis scale is very large, a small data point might look like it is sitting on the bottom line. Adjust the Minimum and Maximum bounds in the Format Axis menu to bring the data into view.
Does this work in Excel for Web?
Yes, but the menu options may differ slightly. You can still find the "Secondary Axis" option by right-clicking the data series and accessing the formatting pane, though the "Combo Chart" creation process is more streamlined in the desktop application.
How do I remove the secondary axis once I've added it?
Right-click the data series that is currently assigned to the secondary axis, select Format Data Series, and change the selection from Secondary Axis back to Primary Axis.
Can I use a secondary axis with a Scatter Plot?
Yes. In a Scatter Plot, you can assign a series to the secondary axis to compare two different sets of XY coordinates that have vastly different scales on the Y-axis.