How to create a dual axis graph using Tableau - Workbook example included

Posted on Mar 15, 2022

Learn how to easily create a dual axis graph using Tableau

A dual axis graph is used to visualize the relationship between two variables in your dataset.

In the example below, A dual axis graph is created using a fictional sales record of an office supplies company.

The graph visualizes the relationship between the Total Sales and Unit Price variables of five different Items sold by the company:

This tutorial will help you learn how to create a dual axis graph as shown above.

First, you need to download the sample dataset used for this tutorial here:


Once you load the dataset to Tableau, do the following steps:

  • Drag the Item variable into the Columns shelf
  • Drag the Total Sales and Unit Price variables into the Rows shelf. Note that the Unit Price variable must be placed to the right of the Total Sales variable.
  • On the Rows shelf, right-click on the SUM(Unit Price) variable and select the Dual Axis option.

The steps are illustrated below:

The Dual Axis option will cause Tableau to integrate the selected variable with the one on its left. You need to pay attention to the position of the variables on your rows shelf before creating a dual axis graph.

The joined dual axis variables can be seen by the shape of the pills on the rows shelf.

Note how the Total Sales and Unit Price pills below have square-shaped angles at the junction point:

The dual axis graph has been generated by Tableau, but you can still improve this graph to make it more appealing.

For example, change the Total Sales mark from Automatic to Bar and Unit Price mark from Automatic to Line.

You will see an improved graph as shown below:

As you can see, the bar and line graphs make the relationship between the two variables easier to understand.

Finally, you can also add the Unit Price variable as a Detail mark to the Total Sales mark.

This way, you can see both the Total Sales and Unit Price values when you hover over the graph:

You can do the same thing with the Unit Price graph.

Your dual axis graph is now finished. You can view and download the Workbook for this tutorial here:

Tableau Dual Axis Example

Now you’ve learned how to create a dual axis graph using Tableau. Nice work! 😉

Level up your programming skills

I'm sending out an occasional email with the latest programming tutorials. Drop your email in the box below and I'll send new stuff straight into your inbox!

No spam. Unsubscribe anytime.