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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Before and after today within a measure

Hello

I wish I could have an IF function within a measure that allows me to call another measure if it is before today and another if it is after today. Is it possible to do this and if so how?

The logic is essentially if( Calander[Date] < ? Today() , Cumulative Sum , Forecast )

Any help will be appreciated.

Best regards

Shaun

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Syndicate_Admin ,

if( max(Calander[Date]) < Today() , [Cumulative Sum] ,[Forecast] )

 

Or

 

calculate([Cumulative Sum], filter(Calander, Calander[Date] < Today() )) + calculate([Forecast] , filter(Calander, Calander[Date] >= Today() ))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Syndicate_Admin ,

if( max(Calander[Date]) < Today() , [Cumulative Sum] ,[Forecast] )

 

Or

 

calculate([Cumulative Sum], filter(Calander, Calander[Date] < Today() )) + calculate([Forecast] , filter(Calander, Calander[Date] >= Today() ))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.