Forum Discussion
Help in counting cumulative for each category separately
- 1 year ago
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.
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.
- Saqibmughal001 year ago
Helper I
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.