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

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

Reply
francisthe63
Helper I
Helper I

Cumulative sum for a summarize variable in DAX

Hello, 

 

I have a problem 

 

in my original table i had a measure that cumulates value in time and where filters works, it's : 

CALCULATE(
SUM(table[Value]),

ALL(Date table),

FILTER(ALLSELECTED(Table[Date],Table[Date] <= DATE TABLE[Date]))

I have another table  where the summarize results in the roiginal table
VAR _t1 = SUMMARIZE(new table,table[ID] (where id is Value + Key + Date),"Date",MAX(New table[Date]) etc ..;

 

Difference between Old table and new table is that the new table is the old table but with duplicates 

 

I try to get back my cumulatives values but i don't know how to do this

 

I tried

 

CALCULATE(SUMX(_t1,[Value]),ALL(date table),FILTER(_t1,[Date]<=MAX(date table[date]))

 

But it don't work because it don't cumulates my value and don't have value that i had before 

 

Do you know how to fix this problem ?

 

Thnak you in advance

4 REPLIES 4
Anonymous
Not applicable

Hi @francisthe63 ,

 

Try the following expression:

Cumulative Value = 
VAR CurrentDate = MAX('Date Table'[Date])
VAR FilteredTable = FILTER(
    ALL('Date Table'),
    'Date Table'[Date] <= CurrentDate
)
RETURN
SUMX(
    FILTER(
        _t1,
        [Date] IN VALUES(FilteredTable[Date])
    ),
    [Value]
)

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Hello

 

It don't work on the step : VALUES(FilteredTable[Date]) because he don't want to recognize FilteredTable ...

Anonymous
Not applicable

Hi @francisthe63 ,

 

Not quite sure what you mean, what is the error message it reports?

 

Best regards,
Community Support Team_ Scott Chang

Greg_Deckler
Community Champion
Community Champion

@francisthe63 No need for CALCULATE, just use a SUMX and your FILTER.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.