Forum Discussion
Cumulative Sum including Nulls
- 5 years ago
Hi Anonymous ,
I don't know all the prerequisites and how your raw data looks like, but assuming you have a proper Calendar table ("Date" in my example) connected to your Data table by Date column:
Measure 1:
CasesAmt = COALESCE(SUM(ASGMT[Cases]),0)Measure 2:
CasesYTD = CALCULATE([CasesAmt], DATESYTD('Date'[Date]))If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
Hi Anonymous ,
I don't know all the prerequisites and how your raw data looks like, but assuming you have a proper Calendar table ("Date" in my example) connected to your Data table by Date column:
Measure 1:
CasesAmt = COALESCE(SUM(ASGMT[Cases]),0)
Measure 2:
CasesYTD = CALCULATE([CasesAmt], DATESYTD('Date'[Date]))
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
Thank you ERD! Looks like I had an issue with my Data modelling. I had selected both as cross filtering direction which was causing troubles. As soon as I corrected the cross filtering direction, my previous formula and the one suggested by you started to work 🙂 Thanks heaps for your help 🙂