Forum Discussion
Optimize SUMX / SUMMARIZE Measure
- 5 years ago
Hello, I'm not sure if you have figured out why it was slow, but I think it's probably
your if statement in your SUMX.SummedPriceImpact = SUMX ( SUMMARIZE ( 'Fact', 'Customer'[Sales Team], 'Customer'[Sales Man], 'Customer'[Customer], 'Store'[Store], 'Article'[Article] ), [PriceImpact] )I see 2 things :
1) [PriceImpact] triggers Context transition for each iteration which is bad with a Big Fact table
2) You should always avoid using IF statement inside an Iterator like SUMX. The use of IF statement will require a call to the Formula Engine for each iteration and the iteration is done by the Vertipaq engine.
One solution to speed up the process would be to precalculated your [PriceImpac] measure inside a Calculated column in your Article Dimension. It will be stored in memory.
Maybe I did not understand your problem very well and this won't work for you.
Also 2M rows is nothing for a Tabular model. You should be able to have a speed < 1sec like the other person said earlier.
Hi, Have you found a solution to this problem? How is your performance? I have a very similar measure on a 1.4m rows fact table and if I plot it against months it takes 10-15 seconds for the visual to load.