Forum Discussion
newbie9292
Helper II
5 years agoHelp with DAX for cummulative data
I want to get the running total or cummulative total in the "KUM_LY_AE" column like in "KUM_AE" column but only getting summarized data. This the dax query I am using : KUM_LY_AE = CALCULATE (SUM(...
- 5 years ago
Hi newbie9292 ,
Please use the following measure:
KUM_LY_AE = CALCULATE (SUM(AE_2020[AuftrEing]),FILTER (ALLSELECTED(Date_dim[Date]),Date_dim[Date] <= MAX (Date_dim[Date])&&MONTH(Date_dim[Date])<=MONTH(MAX (Date_dim[Date]))))It works well based on my test data.
You can also refer to my test pbix.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
aj1973
Community Champion
5 years agoIt looks like you date column is not formated. It should look like this
Or add Date to rows and then delete Quarter and Day
Or add a new field MMM-YY, if it's easier for you.
newbie9292
Helper II
5 years agoIt looks like this :
Do I need to change the DAX query :
Kum_AE = CALCULATE (SUM(AE_Weekly[AuftrEing]),FILTER (ALLSELECTED(Date_dim[Date]),Date_dim[Date] <= MAX (Date_dim[Date])))
?
?
- aj19735 years ago
Community Champion
Why? what's wrong with what you see?
- newbie92925 years ago
Helper II
This my expected output :
The only part wrong in this one is the KUM_LY_AE which should show the cummulative data per month.
- newbie92925 years ago
Helper II
I am using this DAX query to calculate the cummulative or running total for the year 2020 :
KUM_LY_AE = CALCULATE (SUM(Combined[AuftrEing]),FILTER (ALLSELECTED(Date_dim[Date]),YEAR(Date_dim[Date])=2020 && Date_dim[Date] <= MAX (Date_dim[Date])))But it is not working. 😞 - aj19735 years ago
Community Champion