Now naturally all the variables 1-4 will evaluate first then the If conditions however what i want to do is only evaluate the variable if the condition is met first.. My actual script contains over 30 nested IF's and on each click on a filter evaluates all the variables and then the condition leading to extremely slow performance.
Has anyone identified a way to tackle this in a simple way
Re: Qlik Sense Calculating Variables in an 'IF' Statement
Yes i have, the purpose behind this is on the fly dynamic measures and dimension selection in a pivot table from data island list selection.
Yes the ideal way would be to remove the if statement and create a single table with changing expression, but im purposely trying to achieve everything in a single Pivot table. So here i basically want to somehow not calculate the variables until a condition is met on the fly to boost performance. what iv shown above is only a small snipped of the if statement each variable 1-4 has inner variables with complex calculation . Im trying to show the possibility of achieving this on the fly without the use of any extensions or plugins. The concept now works but its slow