Forum Discussion
Anonymous
7 years agoNot applicable
Cumulative Sum Measure
Hi all, I'm struggling with creating a cumulative sum in Power BI desktop. The cumulative sum would be used to figure out a buying schedule for one of our internal buyers here. So the fields wi...
v-danhe-msft
7 years agoMicrosoft Employee
Hi Anonymous,
Based on my test, you could refer to below formula:
Measure = CALCULATE(SUM(PRODPURCH[Quantity]),FILTER(ALL(PRODPURCH),'PRODPURCH'[Item number]<=MAX('PRODPURCH'[Item number])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Anonymous
7 years agoNot applicable
Hi Daniel,
Thank you for the response, but unfortunately this did not work, please see the attached image.
At each change in quantity, I'd expect the 'Measure' measure to change along with it, but it does not. Can you please advise?
Thanks, Gary
- v-danhe-msft7 years agoMicrosoft Employee
At each change in quantity, I'd expect the 'Measure' measure to change along with it
What could you mean it? Could you please offer me your sample data to have a test?
Regards,
Daniel He