Forum Discussion
Anonymous
6 years agoNot applicable
cumulative sum without date
Hi! I need to identify the most sold products which represent 80% of my sales. For instance: PRODUCT SALES CUMULATIVE SALES A 50 ...
- 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
6 years agoSuper User
Anonymous ,
Can you try like
Cumm Sales = CALCULATE(SUM(Table[Sales]),filter(Table,Table[PRODUCT] <=maxx(Table,Table[PRODUCT])))
Cumm Sales = CALCULATE(SUM(Table[Sales]),filter(Table,Table[PRODUCT] <=max(Table[PRODUCT])))
You can also use the quick measure to create running total
- Anonymous6 years agoNot applicable
Thanks for your answer but none of your measures cumulate sales. All of them only show up Sales without cumulation
- amitchandak6 years agoSuper User
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
- Anonymous6 years agoNot applicable
Sorry but none works:
Cumm Sales maxx = CALCULATE(SUM(SALES[SALES]);filter(SALES;SALES[PRODUCT]<=maxx(SALES;SALES[PRODUCT])))Cumm Sales max = CALCULATE(SUM(SALES[SALES]);filter(SALES;SALES[PRODUCT]<=max(SALES[PRODUCT])))