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
Try with all. Have you tried quick measure
Cumm Sales = CALCULATE(SUM(Table[Sales]),filter(all(Table),Table[PRODUCT] <=maxx(Table,Table[PRODUCT])))
Cumm Sales = CALCULATE(SUM(Table[Sales]),filter(all(Table),Table[PRODUCT] <=max(Table[PRODUCT])))
https://docs.microsoft.com/en-us/power-bi/desktop-quick-measures
Sorry but none works:
- amitchandak6 years agoSuper User
Anonymous , I think the last column is working, sort on product and check . Also you can move product in separate Tale and join on the product and try
Cumm Sales max = CALCULATE(SUM(SALES[SALES]);filter(All(Product;Product[PRODUCT]<=max(Product[PRODUCT])))
- Anonymous6 years agoNot applicable
amitchandak Thanks for your answer but I need to identify the most sold products, so I need to start cumulating from the most sold to the least sold product.
Creating a new table for Product gives me the same result.
- amitchandak6 years agoSuper User
Anonymous , Please find the attached solution