Tamsen Haught - Mar 8, 2017

Creating a Dual Axis Chart in Tableau

Dual Axes Definition

Dual axes are two independent axes that are layered on top of each other. According to Tableau, dual axes allow you to compare multiple measures. Dual axes are useful when you have two measures that have different scales.

Using Dual Axes in Tableau

How do you create a dual axis chart in Tableau? It's easy to do once you know a few tricks.

Any continuous data field can be used in a dual axis chart. This means you can use measures such as Sales, Profit, and date fields in your chart. I will walk you through how to set up a dual axis chart using both a number and date field. For both my examples, I will be using the Sample – Superstore data set.

Dual Axis Chart with Measure

For our first chart we are going to look at the Sales and Profit against Sub-Category.

  • First, pull sub-category onto Columns.
  • Drag Sales to Rows and then drag Profit to Rows next to Sales. You will then have SUM(Sales) next to SUM(Profit).
  • Right click on SUM(Profit) and choose Dual Axis.dual axis
  • You will notice that now that you have the dual axis, the two axes have different scales. At this point, you need to decide whether or not the two axes should be syncronized.  To do this, right click on the Profit axis and select Synchronize Axis.synchronize
  • Once you have a dual axis chart, you will be able to use different marks each measure. On the Marks Card, you will now have the option to format the two measures differently.
    marks
  • If we want to have a bar chart for Sales, click on the SUM(Sales) section on the Marks card and choose Bar from the drop down menu.marks bar

 

Dual Axis Chart with Date

The steps for creating a dual axis date chart are very similar to what we did above.  For this chart, we will be looking at profit against ship date and order date.

  • Drag Profit to Rows.
  • Next, right click and drag Order Date to Columns. When the Drop Field pop-up appears, select continuous Month.drop field
  • Now, right click and drag Ship Date to Columns. Now, like above, select continuous Month.
  • Right click on Month(Ship Date) and click Dual Axis.
  • Now, right click on the Ship Date Axis, and choose synchronize axis.
    date dual axis
  • Now, go to the Marks Card and select All. We will need to remove “Multiple Fields” from Color.
    marks color
  • Then on the Marks Card, click on Month(Order Date) and manual change the color, so you have a different color for the Ship and Order Date Profit lines.

I hope that this helps you to create your own Dual Axis Chart in Tableau.  It can be a very powerful chart once you are familiar with the ins and outs of creating it.

Written by Tamsen Haught