Forum Discussion
Measure taking too long
- Anonymous3 years ago
Hello Ackbar-Learner , too many ifs will cause performance issues, your best bet is to put those ifs in a var result = (your if formula) the return result.
This will boost your performance a bit
Try avoiding too many ifs across many measures .what i mean
Measure1 = if(name = value, calc,0)
Then you do another measure
Measure2= if(measure1>0,calc2,calc)
Then you do another measure:
Measure3 = if(measure2 =measure1,calc3,0)
The above is a complete random example to help you understand that this will cause performance issue because poeerbi have to recalculate all the ifs of all measures inside measures.
Putting those measure in var first
Measure1 =
var cond= if(name = value,calc,0)
Return cond
... this might help boost your performance
- 3 years ago
@ppm this is a nice video. I watched the one after and tried to do the same to my model. I won't say it worked perfectly but it is much more improved now.
As for the measure, which is taking a lot of time; it is the sheer amount of data, which is causing this issue. Once i optimized a bit more on the filter, it got much better.
Thanks a lot.
Please see my recent video on how to isolate and test each of your measures to see which is the worst performer. My guess it that it is one or both of the SUMX ones where you have a measure evaluated on each row (1b and 6b).
https://www.youtube.com/watch?v=ScJVQoOWSqc
Pat
@ppm this is a nice video. I watched the one after and tried to do the same to my model. I won't say it worked perfectly but it is much more improved now.
As for the measure, which is taking a lot of time; it is the sheer amount of data, which is causing this issue. Once i optimized a bit more on the filter, it got much better.
Thanks a lot.