Forum Discussion
cumulative sum without date
- 6 years ago
Anonymous
Cumulative is based on the sort order , You can sort on sales
Cumm1 = CALCULATE(sum('product'[SALES]),FILTER(all('product'),'product'[SALES]>=MAX('product'[SALES])))Better you create a dense rank and use that. New column
rank = ranks(all(Product),Product[sales],,asc,dense)
Use rank in last formula
amitchandak I really appreciate your help but your measure works because A is the most sold product and F is the least sold product.
If you change the product names to other which do not meet the alphabet order, the formula does not work. For instance:
May you please try with these product names?
Thanks in advance
Anonymous
Cumulative is based on the sort order , You can sort on sales
Cumm1 = CALCULATE(sum('product'[SALES]),FILTER(all('product'),'product'[SALES]>=MAX('product'[SALES])))
Better you create a dense rank and use that. New column
rank = ranks(all(Product),Product[sales],,asc,dense)
Use rank in last formula
- Anonymous6 years agoNot applicable
amitchandak This is the measure I was looking for!
Cumm1 = CALCULATE(sum('product'[SALES]),FILTER(all('product'),'product'[SALES]>=MAX('product'[SALES])))Thanks a million!