cancel
Showing results for
Did you mean:

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

## 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
Super User

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

Or

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

Super User

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

Or

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