Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I am trying to create a cumulative value for each category as pictured. I tried below DAX but its not giving me cumulative but a weekly data again.
"
"
can someone Help please
Solved! Go to Solution.
Hi @Saqibmughal00,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @maruthisp, for your input on this issue
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Dax Measure:
Cumulative Value by Description =
VAR CurrWeek = MAX(CIPFAnalysis[Week Ending])
VAR CurrDesc = SELECTEDVALUE(CIPFAnalysis[Description])
RETURN
CALCULATE(
SUM(CIPFAnalysis[Value]),
FILTER(
ALLSELECTED(CIPFAnalysis),
CIPFAnalysis[Week Ending] <= CurrWeek &&
CIPFAnalysis[Description] = CurrDesc
)
)
Output:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi @Saqibmughal00 ,
I hope you have created a measure for EarnedHours, something like below:
EarnedHours =
SUM( CIPFAnalysis[EarnedHours] )
Then, I am creating cumulative based on the above measure with some range:
CumulativeEarnedHours =
VAR CurrCategory = SELECTEDVALUE( CIPFAnalysis[Category] )
VAR CurrWeek = MAX( CIPFAnalysis[WeekEnding] )
RETURN
CALCULATE(
[EarnedHours],
FILTER(
ALLSELECTED( CIPFAnalysis ),
CIPFAnalysis[Category] = CurrCategory
&& CIPFAnalysis[WeekEnding] <= CurrWeek
)
)
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X
It didnt work and My measure for earned hours is as below:
Hi @Saqibmughal00,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @maruthisp, for your input on this issue
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Dax Measure:
Cumulative Value by Description =
VAR CurrWeek = MAX(CIPFAnalysis[Week Ending])
VAR CurrDesc = SELECTEDVALUE(CIPFAnalysis[Description])
RETURN
CALCULATE(
SUM(CIPFAnalysis[Value]),
FILTER(
ALLSELECTED(CIPFAnalysis),
CIPFAnalysis[Week Ending] <= CurrWeek &&
CIPFAnalysis[Description] = CurrDesc
)
)
Output:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Thanks for the solution and it worked on one end but there is small issue which appeared.
the cumulatives are counted based on last week but I have separate modules (they are small scopes which contribute to earn hours) and I can see no weekly data but have cumulative for the full period selected above drawn on their chart.
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |