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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
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.