Hi recently i noticed serious performance issues on my production datasets and i created small dataset which is showing what the problem is. I have create 4 type of measures
Original : Measure = SUMX('Table',SUM('Table'[Value])*RAND()) // just doing some random stuff
Slow nested with 3 levels of nesting. Here i do swtich with selectedavlue from other table, and based of selection i do always same calcualtion. Idea is just to have 10 possibilities to see that measures is gettgin slower. I have 3 levels in depth
Fast nested calcualtion is just direct refecencing of same measures used in Slow Nested. Here we dont have swithc
VAR Bad Practice is similar like Slow nested but instead of evaluating only one measure based on selected values, here i declare 10 variable first, and then use variable values in switch.
Now i do testing by changin value on switch on the right.
As you can see Slow nested is by far worst option and from my understanding it looks like all expreisons are being evaluated for no reason (only one with selectedvalue should be evaluated). Another thing that came as suprasing is that "VAR bad practice" is performing good.