Most Tableau users would know that there are multiple ways to create a desired visualisation. The last 2 weeks of training had introduced me to yet more creative approaches in using Table Calculations and LOD Expression. A big thanks to David and Craig for the many challenging exercises!

 

For today’s blog, I made the following chart that shows monthly year-over-year (YoY) sales performance. This is a common way to display information on financial reports.

 

Monthly YoY view

 

I thought of 3 ways to achieve this:

  1. Using a Month filter
  2. A calculation with an ” If ” logical test
  3. Table Calculation “Filter” with a parameter control (A screenshot of the worksheet can be found below, note that I hid the months that were not the selected month!)

 

Chart with Table Calc "Filter"

 

Now, all 3 methods result in the same functional Viz. However, what about the processing time when we want to select a different month? Using the performance recording tool in Tableau, I assessed the performance of the 3 worksheets when a user changes the selected month:

 

1. Worksheet with Month Filter

2. Worksheet with “If” Statement

3. Worksheet with a table calculation “filter”

 

At 0.012 s, filtering using table calculations was the fastest way to “filter” data in this example. In addition, note that the other methods involve Tableau compiling (purple bar) and executing (green bar) queries to the database. This is absent when filtering using table calculations.

 

This has been an interesting experiment for me. Not only is there different ways to create visualisations, but the construction of a worksheet also determines the efficiency at which Tableau processes and displays the data.

 

Alex Chan
Author: Alex Chan