Forum Discussion

inglexjc's avatar
inglexjc
Icon for Post Patron rankPost Patron
3 years ago
Solved

Show text for date range between 45 days and 59

I need help getting Refer Dates that are 45-59 days from the refer date show as "Coming Due".  I was able to get Days 60+ to show LATE but can't get days 45-59 to show.   Over 60 Days = IF(Today()...
  • rubayatyasmin's avatar
    3 years ago

    Hi, inglexjc 

     

    you need to create 2 different calculated column. for example

     

    Status =
    VAR TodayDate = TODAY()
    VAR ReferDate = 'YourTable'[REFER_DT]
    VAR DaysSinceRefer = TodayDate - ReferDate
    RETURN
    IF(
    DaysSinceRefer >= 60,
    "Late",
    IF(
    AND(DaysSinceRefer >= 45, DaysSinceRefer < 60),
    "Coming Due",
    BLANK()
    )
    )

     

    then define the number of days since the reference date:

     

    DaysSinceRefer = TODAY() - 'YourTable'[REFER_DT]

     

  • rubayatyasmin's avatar
    rubayatyasmin
    3 years ago

    Try using datediff. 

     

    DaysSinceReferDate = DATEDIFF([REFER_DT], TODAY(), DAY)

     

    appreciate the kudos.