Forum Discussion
Rinn
2 years agoFrequent Visitor
Optimized DAX (SUMX and SUMMARIZE)
Hi, I am trying to optimize my DAX measure because it is too slow on Service BI... To sum up, I am trying to calculate the total sales (%) for each customized category (A, B etc...) of my prod...
- 2 years ago
No need for a SUMX I think, try this:
Total sales Category A % = CALCULATE(SUM ( 'Products Sales'[Sales Unit] ), FILTER(VALUES( 'Products'[Category]), [Created Category Measure] = A)) / SUM ( 'Products Sales'[Sales Unit] )
sjoerdvn
Solution Sage
2 years agoNo need for a SUMX I think, try this:
Total sales Category A % =
CALCULATE(SUM ( 'Products Sales'[Sales Unit] ), FILTER(VALUES( 'Products'[Category]), [Created Category Measure] = A))
/ SUM ( 'Products Sales'[Sales Unit] )