Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JorgeGuajardoH
New Member

Cumulative Sum Measure Not Working Properly

Hello,

 

I'm fairly new using power BI, and I need to create a table with a cumulative sum of cases left open for each day/week/month/year

 

I created masures from my table to substract created  from closed but when I use the recommended dax measure for cumulative sum, it is not providing the expected values, 

JorgeGuajardoH_0-1631055358588.png

The expected result is:

MonthBacklog Accum
Jan971
Feb13521
Mar32427
Apr57218
May88228
Jun129586
Jul178116
Aug232791
Sep287954

 

The measure I'm using is: 

 

Backlog - Acumm - =
calculate('2021 (2)'[Backlog Month],
filter(ALLSELECTED('2021 (2)'),
'2021 (2)'[Created Short Date] <= MAX('2021 (2)'[Created Short Date])))

 

I've been following a lot of post related to this topic but I can figure it out how to get it to work as expected, any guidance/help is very much appreciated.

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

This is caused by current row content. A month corresponds to multiple dates, which is the cause of the issue.

Try to create a year month column as a condition to create a measure.

Measure = CALCULATE(SUM('Table'[Backlog]),FILTER(ALLSELECTED('Table'),'Table'[sort_month]<=MAX('Table'[sort_month])))

Vlianlmsft_0-1631258431044.png

 

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

This is caused by current row content. A month corresponds to multiple dates, which is the cause of the issue.

Try to create a year month column as a condition to create a measure.

Measure = CALCULATE(SUM('Table'[Backlog]),FILTER(ALLSELECTED('Table'),'Table'[sort_month]<=MAX('Table'[sort_month])))

Vlianlmsft_0-1631258431044.png

 

amitchandak
Super User
Super User

@JorgeGuajardoH , Your number are not matching with what you shared in screenshot.

 

but try like

 

Backlog - Acumm - =
calculate([Created cases] - [BL Closed],
filter(ALLSELECTED('2021 (2)'),
'2021 (2)'[Created Short Date] <= MAX('2021 (2)'[Created Short Date])))

 

 

Month should be coming from table 2021 (2)  and should be month of Created Short Date

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amitchandak,

 

You're rigth, numbers did not match on the table above, I followed your advice and it got closer, however it is still not returning the expected value.

 

Please see below, expected value is as on the table in the left, measure is returning the value of the screenshot in the rigth.

 

JorgeGuajardoH_0-1631105839301.png

 

Any advice on how to solve this will be very much appreciated.

 

Thank you!

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors