VizWiz

Launch, grow, and unlock your career in data
Showing posts with label multiple rows. Show all posts

March 29, 2013

Tableau Tip: Displaying multiple, disparate measures on multiple rows

16 comments

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:

image

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.

image

Choosing the continuous Month, you get this:

image

Step 2: Drag your first measure onto the Rows shelf.  I used Sales.

image

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.

image

The chart should look like this:

image

Now we want to add a seconds row that contains Profit Ratio and Discount.

Step 4: Drag Profit Ratio onto the Rows shelf.

image

Step 5: Drag Discount to the right side of the Profit Ratio chart.  You should see a dotted line before you drop it.

image

The result is a dual-axis chart on the second row.

image

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.

image

There are two catches to this type of chart.

  1. You can have as many measures as you want on the top chart.  Simply drag them onto that axis.
  2. 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).