MIP Logo

Filtering data using Table Calculations in Tableau

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here. 

 

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.

 

Share this post