Formula to derive fiscal quarter from a date
I've been working on a formula to try to derive a fiscal quarter from a date value.
Depending upon the data value, I want the output to be in the follow format:
Working previously with a Smartsheet help agent, I've added a couple of helper columns but I'm not yet getting it to work. The columns I'm work with are:
Target Delivery: MM/DD/YY
Helper (Fiscal) Year: FY21- <---- Here is my problem!
Helper (Fiscal) Quarter: Q1 (or Q2....) =IF(MONTH([Target Delivery]@row) = 1, "Q4", IF(MONTH([Target Delivery]@row) > 10, "Q4", IF(MONTH([Target Delivery]@row) > 7, "Q3", IF(MONTH([Target Delivery]@row) > 4, "Q2", "Q1")))). <---- This works fine.
Fiscal Quarter: FY21-Q1 <---- Here I will just concatenate the two helper column outputs
I cannot seem to get the Helper Year column to work. I'm starting with the following formula but need more help:
=IF(ISDATE([Target Delivery]@row), IF(MONTH([Target Delivery]@row) = 1, YEAR([Target Delivery]@row), IF(MONTH([Target Delivery]@row) > 1, YEAR([Target Delivery]@row) + 1), IF(MONTH([Target Delivery]@row) > 13, "")))
Any ideas? I've attached a visual of my spreadsheet if that helps.
Best Answer
-
My apologies. I had an extra closing parenthesis tucked in there. Try this one...
=IF(ISDATE([Target Delivery]@row), "FY" + IF(MONTH([Target Delivery]@row) = 1, RIGHT(YEAR([Target Delivery]@row), 2), RIGHT(YEAR([Target Delivery]@row) + 1, 2)) + "-Q" + IF(OR(MONTH([Target Delivery]@row) = 1, MONTH([Target Delivery]@row) >= 11), 4, IF(MONTH([Target Delivery]@row) >= 8, 3, IF(MONTH([Target Delivery]@row) >= 5, 2, 1))))
Answers
-
Try this in a single column...
=IF(ISDATE([Target Delivery]@row), "FY" + IF(MONTH([Target Delivery]@row) = 1, RIGHT(YEAR([Target Delivery]@row), 2), RIGHT(YEAR([Target Delivery]@row) + 1), 2)) + "-Q" + IF(OR(MONTH([Target Delivery]@row) = 1, MONTH([Target Delivery]@row)>= 11), 4, IF(MONTH([Target Delivery]@row)>= 8, 3, IF(MONTH([Target Delivery]@row)>= 5, 2, 1))))
-
Looks promising, but I get a #UNPARSEABLE error.
-
My apologies. I had an extra closing parenthesis tucked in there. Try this one...
=IF(ISDATE([Target Delivery]@row), "FY" + IF(MONTH([Target Delivery]@row) = 1, RIGHT(YEAR([Target Delivery]@row), 2), RIGHT(YEAR([Target Delivery]@row) + 1, 2)) + "-Q" + IF(OR(MONTH([Target Delivery]@row) = 1, MONTH([Target Delivery]@row) >= 11), 4, IF(MONTH([Target Delivery]@row) >= 8, 3, IF(MONTH([Target Delivery]@row) >= 5, 2, 1))))
-
That is a thing a beauty!! And you make it look so simple. THANK YOU!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!