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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.