Creating a Dual Axis Chart in Tableau Public
For when you need two separate axes on the same chart.
Sometimes you’ll want to create a chart with two different measures that have incompatible axes. For example, if you have daily sales and daily costs you want to see as two separate lines on the same chart, you can do this easily by dragging and dropping the first measure onto the worksheet and then dragging and dropping the next measure you want to add onto the existing axis of the first measure.
These axes could be compatible because they were both measured in dollars and maybe the scale of daily sales is similar to the scale of daily costs but what if the daily sales were much higher than the daily costs or what if you wanted to add a measure for customer traffic but it’s axis would be measured in amount of customers instead of amount of dollars?
This is where the dual axis comes in. This is a way to get an axis with different values so you can have two different superimposed measures to help you find an insight. For example you may notice that your costs aren’t running in proportion with the amount of traffic to your business and can find a way to weed out unnecessary spending on low traffic times.
Here I have some sample data from Air BnB (available on the tableau website: https://public.tableau.com/en-us/s/resources?qt-overview_resources=1#qt-overview_resources). I’d like to see the average sales by neighborhood be compared against the average number of beds. A possible way to do this would be to drag and drop the measure onto the axis as explained above. This is a problem because this axis is measured in dollars with values reaching into the triple digits. Average numbers of beds will look very small or almost unnoticeable in comparison.
As you can see, this doesn’t give us much information and is a little nonsensical to look at. We’ll click undo and retry this process with the dual axis function.
Now this time instead of dropping the measure onto the axis, we’ll drop it into the “rows” shelf. From here we’ll be able to select “dual-axis” from the drop down menu on the measure. Click this to add the axis to your chart.
As you can see now, there are two axes on this chart with different values making it a well proportioned visualization. I hope this article was able to give you a Tableau tip or just show you something new in Tableau Public.