Forum Discussion

psmith-nhs-inc's avatar
psmith-nhs-inc
Helper III
8 years ago
Solved

DateAdd() math cutting off at year mark

OK.  I have a calculated column on my Date table.  I want to know if any particular date is within the last 365 days of today, or the previous 365 days.  I think this should give it to me.  Looking a...
  • Ashish_Mathur's avatar
    8 years ago

    Hi,

     

    Does this work?

    =IF('Date'[Date]>=TODAY()-365,"CY365",IF('Date'[Date]>=TODAY()-730,"PY365",BLANK()))

     

    Hope this helps.