Hi! I'm trying to take a list of dates and bucket them into the correct quarter, then have a column that says which quarter that line item is apart of. The dates in my data set at formatted as : 2020-07-23
The ranges:
Q1: 2019-10-28 to 2020-01-26
Q2: 2020-01-27 to 2020-04-26
Q3: 2020-04-27 to 2020-07-26
Q4 2020-07-27 to 2020-10-25
essentially, what I want my output to look like:
Date | Quarter |
2020-01-01 | Q1 |
2019-12-04 | Q1 |
2020-05-29 | Q3 |
2020-03-14 | Q2 |
Solved! Go to Solution.
Since your quarter start and end dates are very specific dates, you'll have to use an if elseif statement like
if [date]>='2019-10-28' AND date<='2020-01-26' then 'Q1'
elseif [date]>='2020-01-27' AND date<='2020-04-26' then 'Q2'
elseif [date]>='2020-04-27' AND date<='2020-07-26' then 'Q3'
elseif [date]>='2020-07-27' AND date<='2020-10-25' then 'Q4'
else '' endif
Thanks, I copied your formula and was able to get what I need. Tried the statement previously and it wouldn't give me what I wanted...not sure why. Thanks again!