Forum Discussion
Anonymous
6 years agoNot applicable
SWITCH evaluation
As of now, experiments I realized with DAX on SSAS Level 1500, make me think that in the expression :
SWITCH(intValue,
value_1, expr1,
value_2, expr2,
...
value_N, exprN
)
the evaluation engine first evaluate all expr1, expr2, ..., exprN before selecting the correct expression to return.
My questions are : does it really is the case ? Is there any workaround ?
2 Replies
- MattAllingtonCommunity Champion
Read all about it here. https://www.sqlbi.com/articles/optimizing-if-and-switch-expressions-using-variables/
- AnonymousNot applicable
Thank you, I finally found this paper this morning.
Anyway strange behavior.
Again thanks for your help.