Forum Discussion

JumoGra's avatar
JumoGra
Frequent Visitor
2 years ago
Solved

Calculated column DAX

Hi There I have two calculated columns that show a 1 value for all dates that fall with a specified time period but I will like to change my calculations slightly to get a slightly different result. ...
  • ryan_mayu's avatar
    2 years ago

    JumoGra 

     (27/04/23-26/04/24)

    pls try 

     

    =
    Var _StartDate = Edate(TODAY(),-12)+1
    Var _EndDate = TODAY()-1
    return
    IF('CDCalendar'[CallDate]>=_StartDate && 'CDCalendar'[CallDate]<=_EndDate,1,0)

     

     

    (27/03/24-26/04/24)

     

    pls try 

     

     

    =
    Var _StartDate = EDATE(TODAY(),-1)+1
    Var _EndDate = TODAY()-1
    return
    IF('CDCalendar'[CallDate]>=_StartDate && 'CDCalendar'[CallDate]<=_EndDate,1,0)

     

  • JumoGra's avatar
    JumoGra
    2 years ago

    AnalyticsWizard Thanks for your reply, this worked with some minor tweaks only because I changed my mind on how many months I wanted to see, thanks for explaining it!

  • JumoGra's avatar
    JumoGra
    2 years ago

    This works as well, thank you!