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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jay2639
New Member

Cumulative sum

Hello experts:

I have calculated Cumulative sum using DAX
Everything is working fine but if for particular year if we have blank then graph is not showing cumulative sum it’s just showing blank only.

For example:
for Year 2022 sales is blank and for 2021 year sales is 10k
And for 2023 yeat sales is 20k

So ideally graph should show 2021 total sales 10K
2022 total sales 10k
And 2023 total sales 30 k

But it’s showing 10k, zero and 20 k respectively

Any idea?

@Greza @FerFrezza 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Jay2639  This works with the data you shared:

Cumulative Sales =
CALCULATE (
SUM ( Sales[Sales] ),
FILTER ( ALL ( Sales[Year] ), Sales[Year] <= MAX ( Sales[Year] ) )
)

bchager6_2-1716207603415.png

bchager6_1-1716207580156.png

 


 

 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@Jay2639  This works with the data you shared:

Cumulative Sales =
CALCULATE (
SUM ( Sales[Sales] ),
FILTER ( ALL ( Sales[Year] ), Sales[Year] <= MAX ( Sales[Year] ) )
)

bchager6_2-1716207603415.png

bchager6_1-1716207580156.png

 


 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.