Forum Discussion

msommerf's avatar
msommerf
Helper III
7 years ago
Solved

DAX Formula IF Statement Dates

Hi, Please could somebody help with the following? I use this DAX statement below to Calculate the current period in a column for the current month in my Dates table.   Phase Selection = If( mo...
  • Anonymous's avatar
    Anonymous
    7 years ago

    msommerf  - You could add a "Phase" column to your date table. Then in you could do this for your Calculated Column:

     

    Phase Selection=
    var phase_today = CALCULATE(max('Dates'[Phase]) ,'Dates'[Date] = TODAY())
    return IF([Phase] = phase_today, "Current Phase", "Not Current Phase")

    Cheers!

    Nathan

     
  • msommerf's avatar
    msommerf
    7 years ago

    Sorry if it's something stupid I am doing at this end.

    Just learning the rope with DAX.