Monday, March 18, 2013

Combining Types of Graphs (Multiple Mark Types) in Tableau

Today, we will look how to combine different types of graphs in Tableau.  Specifically, we will create a bar graph of monthly sales, with a line for the running average.  As usual, we will use the Superstore Sales sample data set in Tableau.

Step 1:
  • Filter your graph for the year "2012"
  • Drag "Month" to the column shelf
  • Drag "Sales" to the row shelf
Sales by Month
Step 2:
  • Calculate the running average of sales
  • Create the following calculated field
Running Average of Monthly Sales
Step 3:
  • Add the calculation to the Rows Shelf
  • In the Marks Card, click the triangle in the upper-right corner -> Select "Multiple Mark Types"
  • Click the Right Arrow that appeared until you get to "Running Average of Monthly Sales"
  • Change the Mark Type to "Line"
  • Right-click the "Running Average of Monthly Sales" pill and select "Dual Axis"
  • Right-click on the right axis and select "Synchronize Axis"
Sales by Month with Running Average
Voila!  Mission complete.  However, this was only the tip of the iceberg.  There's so much more to be done here.  Try use different graph types for truly brilliant designs.  I will leave you with a more advanced chart that shows Profit by Sub-Category along with a "Pareto" line.
Profit by Sub-Category with Pareto Line
I hope you found this informative.  Thanks for reading.

Brad Llewellyn
Associate Consultant
Mariner, LLC
llewellyn.wb@gmail.com
https://www.linkedin.com/in/bradllewellyn

3 comments:

  1. Are you using version 7 or 8? I do not have an option to select 'Mulitple Marks' in version 8. Is there a workaround for this>

    ReplyDelete
    Replies
    1. This was written for Tableau 7. In Tableau 8, multiple marks is actually the default. For instance, if you put two measures next to each other on the Rows Shelf, you can right-click the second one and select "Dual Axis". This will change your marks card to have multiple sections similarly to the way it worked in Tableau 7. Let me know if this helps.

      Delete
  2. Thank you! This was very helpful

    ReplyDelete