Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

New Column for Quarters

Hello All, I have this quarter's column (Image 1) and I am trying to make a new column against them as "Past and Future" so right now it is 2021Q3 anything including 2021Q3 should be future and anyt...
  • imenka's avatar
    4 years ago

    If I got your question right, you can try this:
    Step 1: get quarter end date, add new column, not measure.

    QEnd = IF(RIGHT('Table'[Quarter],2) = "Q1", Date(left('Table'[Quarter],4),03,31), IF(RIGHT('Table'[Quarter],2) = "Q2", Date(left('Table'[Quarter],4),06,30), IF(RIGHT('Table'[Quarter],2) = "Q3", Date(left('Table'[Quarter],4),09,30), IF(RIGHT('Table'[Quarter],2) = "Q4", Date(left('Table'[Quarter],4),12,31)))))

    Step 2: add one more column to validate current date.
    xPastFuture = IF(TODAY() >= 'Table'[QEnd], "Past", "Future")


    Change logic as per your need hope this works for you