March 29, 2013
Tableau Tip: Displaying multiple, disparate measures on multiple rows
I received a great question from a colleague today. Here’s the situation: You want to look at five measures. You want three measures on the first line chart and two measures on the other line chart. BUT, you want them all in the same view, i.e., one worksheet.
In the end, you want something like this:
This example uses the Superstore Sales data that comes with Tableau. I’ve filtered the Order Date to 2012.
Step 1: Right-click drag the Order Date field onto the Columns shelf and choose a date aggregation.
Choosing the continuous Month, you get this:
Step 2: Drag your first measure onto the Rows shelf. I used Sales.
Step 3: CTRL+Select the other measures you want on the same chart as Sales and drag them onto the Sales axis. I chose Profit and Unit Price. You should see multiple green rulers on the axis before your drop them.
The chart should look like this:
Now we want to add a seconds row that contains Profit Ratio and Discount.
Step 4: Drag Profit Ratio onto the Rows shelf.
Step 5: Drag Discount to the right side of the Profit Ratio chart. You should see a dotted line before you drop it.
The result is a dual-axis chart on the second row.
Step 6: Right click on the Discount axis and choose Synchronize Axis
Step 7: Right click on the Discount axis and uncheck Show Header. This hides the right axis.
Step 8: Clean up the axis titles and formats on the left and you’re done.
There are two catches to this type of chart.
- You can have as many measures as you want on the top chart. Simply drag them onto that axis.
- You can only have two measures in the bottom chart, one of the left axis and one on the right axis.
If someone knows how to get around #2, I’d love to hear how.
Download the workbook here (Tableau 7).