Forum Discussion

gaurav-narchal's avatar
5 years ago
Solved

Date Less than greater than today Measure

Hello

 

I want to create a measure to get the result as–

 

If the contract end date is within 60days as of today then return “Contract Expiring Soon – Level 2”

If the contract end date is within 30days as of today then return “Contract Expiring Soon – Level 1”

If the contract end date is less than or equal to “as of today” then return “Contract Expired”

Else

"Contract Valid"

 

Thanks

Gaurav

 

 

Contract Start DateContract End Date
15-Feb-1814-Feb-21
1-Apr-171-Apr-21
28-Jan-1427-Jan-21
1-Jan-1831-Dec-21
19-Nov-2021-Nov-21
4-Aug-1930-Jul-21
1-Jul-1630-Jun-21
21-May-2021-May-21
1-Sep-171-Sep-20
15-Jan-2015-Jan-21
20-Aug-1320-Aug-11
1-Apr-191-Apr-20
1-Apr-191-Apr-20
31-Aug-2031-Oct-23
  • I am not sure this is the best way but I think it will work:

     

    =IF(Contracts[Contract End Date]<TODAY(),"Contract Expired",

    IF(Contracts[Contract End Date]<TODAY()+30,"Contract Expiring Soon – Level 1",

    IF(Contracts[Contract End Date]<TODAY()+60,"Contract Expiring Soon – Level 2",

    "Contract Valid")))

1 Reply

  • I am not sure this is the best way but I think it will work:

     

    =IF(Contracts[Contract End Date]<TODAY(),"Contract Expired",

    IF(Contracts[Contract End Date]<TODAY()+30,"Contract Expiring Soon – Level 1",

    IF(Contracts[Contract End Date]<TODAY()+60,"Contract Expiring Soon – Level 2",

    "Contract Valid")))