Forum Discussion
Anonymous
6 years agoNot applicable
Slow DAX measure
So I have a dataset of 4.6million rows containing insurance rates for various quotes and their respective insurance company. I have managed to calculate a rank function that ranks each company's rate...
v-eachen-msft
Community Support
6 years agoHi Anonymous ,
You could use VAR() to save the result of an expression as a named variable.
rank =
VAR a =
VALUES ( 'Test'[KEY] )
VAR b =
FILTER ( ALLSELECTED ( 'Test'[Company] ), [AvgRate] )
RETURN
AVERAGEX ( a, RANKX ( b, [AvgRate],, ASC ) )
And you could refer to this video to learn how to optimize your dax.
Anonymous
6 years agoNot applicable
v-eachen-msft Thanks for the suggestion however it took even longer in DAX Studio to as the total time to just calculate this measure was 63,723ms