Forum Discussion
Cumulative Sum or Running Total
Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
We can typically get Cumulative as measure like this
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(Sales[Sales Date])))
- Anonymous5 years agoNot applicable
Hi Amitchandak,
You can see the sample data and data model in the screen above.
Is everything clear or you need a more details?
Thanks in advance.
Fabio
- Anonymous5 years agoNot applicable
Hi Amit,
where do i upload a pbix file here?
I add further details to the problem you existed. Having available data covering several years, my goal is based on the time period of reference (eg. the reason why I insert in the code VAR DATE_TODAY ()) to identify the portion of the data of my interest (eg data that do from 2019 to 2020, I select only the current month October 2020 and i don't use a filter time period) and I calculate the cumulative sum of that period but the DAX code does not give me the desired results.
Attached I uploaded additional screens to make the problem clearer:
1) For each table in the yellow data model I have selected my period of interest (October 2020);
2) The DAX code and the result that comes from the graphsThanks a lot to anyone who can help me to solve this problem.