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
newbie9292
Helper II
5 years agoHello aj1973 ,
This how my formatted date column looks like:
This is the visual :
When I select 2020 in the slicer, the cummulated value is shown correctly :
But when I select 2020 and 2021 in the slicer, it messes up the cummulated data for 2020 only :
PaulDBrown
Community Champion
5 years agoyou need to add the year field from your date table to the visuals and then drill down to month level