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() ))

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors