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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Cumulative Values Going beyond Current Date

Hello,

 

Looking for some help on the following Dax Formula 

 

Keiser_0-1652361181185.png

Im looking for the "Cumulative Actuals to date" values to stop at 30-April-22 and not repeat to the end of the calander

The Dax formula I used is as follows:

 

Cumulative Actuals to Date = SUMX(FILTER(ALLSELECTED(Calender[Date]),Calender[Date]<=MAX(Calender[Date])),[Total of Craft and Staff Cost])
 
I know it has to do with the <=Max Calander date but cant wrap my head around it.... 
 
Any help would be appreciated
 
Thanks
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Add a new column to your date table like

Current month or before = 'Date'[Date] <= EOMONTH(TODAY(),0)

then wrap the code for your measure inside

IF( SELECTEDVALUE( 'Date'[Current month or before], existing code here )

that will return blank for future dates

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Add a new column to your date table like

Current month or before = 'Date'[Date] <= EOMONTH(TODAY(),0)

then wrap the code for your measure inside

IF( SELECTEDVALUE( 'Date'[Current month or before], existing code here )

that will return blank for future dates

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.