Tableau Dashboard Performance Series: Tip#14: Expensive Calculations

Expensive Calculations. hmmm. what does that mean?

How do I know what is going to be expensive? Yes, fair question. I would ask you to think what you are asking the calc to do.

Here is an example

I want to create a calculation that creates a hierarchy.

Let’s say I have the following Status values on a field

On you want to create field called “High Level Status” that combines these values to a higher level, like this

You can create this calculation like so

which is a terrible idea.

Why? Because you are asking each row to be evaluated 11 times for each condition.

The same calc could be written various ways, like

This is basically same business logic but once a value has been met, Tableau isn’t going to keep checking if the value in the row matches another value mentioned in the calc.

Better still, you could just do

this will be a much more efficient manner of doing the same calc.

BTW, the IN operator just got released on 2020.3

Published by

Lovekesh Babbar

Speaker on topics related to data, analytics and digital transformation