If you don’t write efficient calcs, it can slow down your dashboard.
In this article, we will show you how to speed up OR statements with multiple conditions in Tableau.
You can also look this video to see how we did it!
The Workbook Loaded in 41 Seconds
The dataset had information about flights.
We wrote a simple calculation to compare a value against a list of values:
The workbook took 41 sec to load.
The above calculation has a series of conditions which get evaluated one by one.
The more conditions you have, the more time it takes.
The more rows (data) you have, the more time it takes.
We Modified the Calculation to use ‘IN’ Function
IN statement directly compares a dimension against a list – much simpler & faster.
So, we modified the calc to use IN statement instead of OR statement.
Now, the same workbook took 29 sec to load in Tableau– that is 29% lesser time.
To improve further, we switched to an Extract connection.
Then, it took just 0.43 sec – 98.9% lesser time!
To Conclude
When you want to compare a value against a list of values, IN function would perform better than OR function.