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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
gbarr12345
Post Prodigy
Post Prodigy

Cumulative Total query

Hi,

 

I have data that I've been asked to include a cumulative total beside.

 

All the data is from the 1st day of various months:

 

gbarr12345_0-1722893908082.png

 

 

However when I add the cumulative total, it puts it inside dates for the middle of the month which leaves blanks in the volume section:

 

gbarr12345_1-1722893953072.png

 

 

How do I get the blanks to not appear?

 

My current measure code is below:

 

Depletion Cumulative Total =
CALCULATE(
    SUM(Depletion[9LE]),
    FILTER(
        ALL(Dim_Date[Date]),
        Dim_Date[Date] <= MAX(USA[Date])
    )
)
1 ACCEPTED SOLUTION

Try this, and let me know if there are any problems:

Depletion Cumulative Total =
IF ( NOT ISBLANK(SUM(Depletion[9LE])),
CALCULATE(
SUM(Depletion[9LE]),
FILTER(
ALLSELECTED(Dim_Date[Date]),
Dim_Date[Date] <= MAX(Dim_Date[Date])
)))

View solution in original post

5 REPLIES 5
ahadkarimi
Solution Specialist
Solution Specialist

Hi, you can try this to remove blanks:
Depletion Cumulative Total =
IF ( ISBLANK(SUM(Depletion[9LE])),
BLANK(),
CALCULATE( SUM(Depletion[9LE]),

FILTER( ALL(Dim_Date[Date]), Dim_Date[Date] <= MAX(USA[Date]))))

Hi,

 

Thank you for your response. 

 

I tried this but it doesn't seem to work:

 

gbarr12345_0-1722897641567.png

 

Try this, and let me know if there are any problems:

Depletion Cumulative Total =
IF ( NOT ISBLANK(SUM(Depletion[9LE])),
CALCULATE(
SUM(Depletion[9LE]),
FILTER(
ALLSELECTED(Dim_Date[Date]),
Dim_Date[Date] <= MAX(Dim_Date[Date])
)))

That worked, thank you so much!

My pleasure!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.