I'm trying to understand, how the first argument of the SWITCH-function is being evaluated/calculated when checking the second arguments.
Here an example:
SELECTEDVALUE( Product[Color] ) ,
Will the SELECTEDVALUE ( Product[Color] ) be calculated at the beginning, then saved like a variable, and then in the second step only compared to the different colors? Or is it computed for every line of comparison new?
Personally I think that it is beeing calculated once, stored, and then compared. But I was wondering, because I saw someone writing the SWITCH-Function with a variable as TRUE/FALSE argument:
var color = SELECTEDVALUE( Product[Color] )
And this got me thinking, maybe I was wrong. Would be great if someone could enlighten me 😉
PS: I'm just curious if there is a difference in performance, that there could be differences when the function is being evaluated row by row I'm aware 🙂