Forum Discussion
BillyT_350
8 years agoHelper V
Slow Measures
I have report that analyzes data on customers. Data is filtered by three slicers, one for customer, another for data date, and the third for internal business unit (responsible for the customer). ...
- Anonymous8 years ago
With this measure, you are calling, and calculating the [Scr%_ApptDesir] measure 7 times...it only needs to be calculated once.
try this:
Grd_ApptDesir = VAR Score = [Scr%_ApptDesir] RETURN SWITCH ( TRUE (), Score >= .9, "A", Score >= .8, "B", Score >= .7, "C", Score >= .6, "D", "F" )
jthomson
8 years agoSolution Sage
I'm not sure why you're using an AND function in every bit of your measure, the way it's coded the first requirement is completely superfluous (e.g. in the second stage, it must be less than 0.9, as if it was 0.9 or more it's not reaching the second IF in the first place), don't know whether that'd make a huge difference in performance though
BillyT_350
8 years agoHelper V
jthomson That's true, I just prefer to have everything defined for the freak occurences / Power BI glitches.
Nonetheless, as per your suggestion, I took out the redundant ANDs, and there is no perceptable change.