Forum Discussion

charlessutton's avatar
charlessutton
Frequent Visitor
5 years ago
Solved

Help with If Function in Measure

I have two data tables and a calendar table. The data tables actual values by month and forecasted values by month. I would like to display the value of either actual or forecast based on the month. ...
  • MattAllington's avatar
    MattAllington
    5 years ago

    I can't see how that will work over the year end. I recommend adding a calc column that determines if the date has passed, or is in the future. Eg

    Status=IF(calendar[date]<today(),"past","future")

    then write a measure

    =IF(SELECTEDVALUE(Calendar[Status])="Past",[Actual],[Forecast])