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
Anonymous
Not applicable

Cumulative SUM with date filter

Hello,

 

I am having an issue that I can't seem to figur out.

 

I need a cumulative SUM but only since a certain date.

 

Calculated Column= CALCULATE(SUM(Column), ALL('Table'),'Table'[Date]<= EARLIER('Table'[Date]))
 
I need to add another filter that only does this calculated column when date >= 2021/01/01 
 
How can this be done?
 
Thanks a lot!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

Calculated Column= SUMX(Filter('Table','Table'[Date]<= EARLIER('Table'[Date]) && 'Table'[Date] > date(2021,01,01)), [Column])

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

View solution in original post

4 REPLIES 4
Angith_Nair
Continued Contributor
Continued Contributor

Hi @Anonymous ,
You can try this measure..

 

Column =
CALCULATE (
    SUM(Column),
    ALL ( 'Table' ),
    'Table'[Date] <= EARLIER ( 'Table'[Date] ),
    'Table'[Date] >= DATE(2021,01,01)
)

 

amitchandak
Super User
Super User

@Anonymous , Try like

Calculated Column= SUMX(Filter('Table','Table'[Date]<= EARLIER('Table'[Date]) && 'Table'[Date] > date(2021,01,01)), [Column])

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
Anonymous
Not applicable

Have one question, if you're able to answer please.

Why doesn't it work for the opposite situation, so

< date(2021,01,01) instead of >date(2021,01,01)

 

 

 

Anonymous
Not applicable

That works for me!
Thank you so much

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.