Today in training, we were learning the fundamentals of Tableau, one being Table Calculations…

Table calculations can be incredibly powerful, but also quite complex, with many permutations for each calculation type.
I’m hoping to clear up some of this complexity, to make using these tools a little easier.

There are 2 ways of creating Table Calcs:

  1. Quick way – Right-click on your chosen field, find the “Quick Table Calculation” option, and selecting your Calculation:

This is pretty quick, but Tableau will automatically generate the most obvious Table Calc which might not be the one you had intended, and it can sometimes be difficult to work out which calculation Tableau has opted for.

2. Complete/proper way – Right-click your chosen field as before, and find the “Add Table Calculation” option, which will bring up the following window:

Thankfully, the photo below exists to help explain how to “read” this window:

You read the window as explained in the photo:
“For each *unchecked fields*, compute the *calculation type* by *checked fields*”.

So the example below reads:
“For each region, compute the running total (of Sum of Profit) by Month of Order Date”.

This ensures that the calculation starts over for each region, instead of picking up from where the previous region left off.

The main benefit of this method is that you have complete control over EVERY aspect of the Table Calc, which while time-consuming, is guaranteed to give you the Calc you were looking for. It also help reinforce your understanding of the logical process Tableau uses to create the calculation!