Forum Discussion

ripstaur's avatar
ripstaur
Helper III
5 years ago
Solved

Multiple IF or SWITCH with dates

I have a column containing report dates. I want to create another column that reflects a reporting period, so for instance if the date of the report is after 2/5, it returns "Feb YY" and if any repor...
  • nandic's avatar
    5 years ago

    Hi ripstaur ,
    You should use Date function when referencing dates.

    Reporting Period v2 =
    IF (
        [Report Date] > DATE ( 202125 ),
        "Feb 21",
        IF ( [Report Date] > DATE ( 202115 )"Jan 21""NA" )
    )

    Attached demo file. You can make it more dynamic if needed to always compare to 5th day of month. Idea started, you can customize if needed.

     

    This is the result:

     

    Best regards,
    Nemanja Andic