How to Add Second Y-Axis in Google Sheets
Ever needed to visualize data with two different scales in Google Sheets? While it might seem a bit daunting, adding a second y-axis can provide invaluable insights by letting you display two distinct types of data simultaneously. Let's dive into how to do this step-by-step.
Before we proceed, make sure you're working with two distinct sets of data that would benefit from being viewed on different scales. A classic example is displaying stock prices alongside the company's share volume; one is typically much larger than the other and therefore difficult to read on the same scale.
Enabling Duplex Charts in Google Sheets
Google Sheets doesn't directly support dual y-axes. However, you can achieve this effect using Duplex charts, a workaround that involves creating two line charts side by side. Let's learn how.
First, ensure you have the necessary data. Create two columns side by side - one for each set of data. Assume column A has stock prices and column B has share volume.
Dashboard Automation
To automate the process, create a new sheet and copy these two columns on the new sheet. Now let's create two charts separately to eventually combine them.
Select the cells (A:B) and go to Insert > Chart. In the 'Chart editor' panel on the right, select Customize tab, then under Chart type, choose Line. Click and drag the chart to set its location.
Creating the Second Chart
Next, create a second chart for the second column of data. Repeat the above steps, select cells (B:B), then create a new chart. In the 'Chart editor', set the Chart type to Scatter, ensuring it's easily distinguishable from the first chart.
However, you still see both charts on the same scale. To rectify this, follow the steps below:
Scaling the Charts
Here's where the magic happens. We hide the actual y-axis values of both charts, then display them separately.
Changing the Scales
With the first chart selected, click the Crosshairs icon in the top-right corner, then click the Scale menu and choose Custom scale. Set the min and max values as needed for this chart. Click Apply.
Repeat the step for the second chart. Change the values apart from first chart. Apply changes to both. Both will now have their own scales, presenting your data as you desire.
Mirroring and Adjusting
Now, let's make the charts look like they're on the same scale. Click the Mirror icon at the top. Your second chart should now mirror the first chart's x-axis. It should now look like a single chart with a dual y-axis.
Finally, you might want to adjust the charts slightly to ensure they're perfectly aligned. To do this, simply click and drag the lines to move them until the two charts look seamless.
Now you can add a title, labels, etc., making your new dual-axis chart visually appealing and above all - informative. Happy data analysis!