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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s