Forum Discussion
inglexjc
Post Patron
3 years agoShow 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()...
- 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]
- 3 years ago
Try using datediff.
DaysSinceReferDate = DATEDIFF([REFER_DT], TODAY(), DAY)
appreciate the kudos.
inglexjc
Post Patron
3 years agoThe 1st part worked beautifuly.
The seond part to show the number of days:
DaysSinceRefer = TODAY() - 'V_TR_Assessments_Open_NEW'[Refer Date] shows like this on my table, how do I get it to show how many days the referal has been open instead of giving me a wrong date?
rubayatyasmin
Community Champion
3 years agoTry using datediff.
DaysSinceReferDate = DATEDIFF([REFER_DT], TODAY(), DAY)
appreciate the kudos.