The FY starts June 1, 5/30/2024 should be FY23 but is showing as FY24. What am I doing wrong?
Answers
-
Hi @Paul Newcome, Thank you for providing this formula. I am getting incorrect results. The FY starts June 1, the date 5/30/2024 should be FY23 but is showing as FY24. What am I doing wrong?
="FY" + RIGHT(YEAR(Date@row) + IF(Date@row >= DATE(YEAR(Date@row), 6, 1), 1, 0), 2)
-
1. YEAR(Date@row)
:- Extracts the year from the date in
Date@row
.
- Extracts the year from the date in
2. IF(Date@row >= DATE(YEAR(Date@row), 6, 1), 1, 0)
:- Checks if the date is on or after June 1st of the current year (
DATE(YEAR(Date@row), 6, 1)
). - If
Date@row
is on or after June 1st, the fiscal year will roll over to the next calendar year by adding1
to the year. - Otherwise, the fiscal year remains the same as the current calendar year.
- Checks if the date is on or after June 1st of the current year (
3. YEAR(Date@row) + IF(..., 1, 0)
:- Adjusts the year based on the result of the IF statement. If the date is after June 1st, it adds
1
to the year.
- Adjusts the year based on the result of the IF statement. If the date is after June 1st, it adds
4. RIGHT(..., 2)
:- Extracts the last two digits of the adjusted year (e.g., for 2024, this will return
24
).
- Extracts the last two digits of the adjusted year (e.g., for 2024, this will return
5. "FY" + ...
:- Concatenates the string
"FY"
with the two-digit fiscal year calculated above.
- Concatenates the string
From what you are saying above, the part explained at no 2 above is adding 1 to your year digits instead of deducting
You would rather need to use="FY" + RIGHT(YEAR(Date@row) - IF(Date@row >= DATE(YEAR(Date@row), 6, 1), 1, 0), 2), wich will
1. YEAR(Date@row)
:- Extracts the year from the date in
Date@row
.
- Extracts the year from the date in
2. IF(Date@row >= DATE(YEAR(Date@row), 6, 1), 1, 0)
:- Checks if the date is on or after June 1st of the current year.
- If
Date@row
is on or after June 1st, it subtracts1
from the year. - If the date is before June 1st, no subtraction happens (returns
0
).
3. YEAR(Date@row) - IF(..., 1, 0)
:- Adjusts the year based on the result of the
IF
statement. If the date is on or after June 1st, the fiscal year will be based on the previous calendar year (subtracts 1). If the date is before June 1st, the fiscal year remains the same as the current calendar year.
- Adjusts the year based on the result of the
4. RIGHT(..., 2)
:- Extracts the last two digits of the adjusted year (e.g., for 2024, this will return
24
).
- Extracts the last two digits of the adjusted year (e.g., for 2024, this will return
5. "FY" + ...
:- Concatenates the string
"FY"
with the two-digit fiscal year calculated above.
- Concatenates the string
Hope this helps
Marcé Holzhauzen
Solution and Delivery Consultant with Award Winning Partner
Want to meet?Check my availabilitywww.prodactive.co.uk
If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome. -
Give this a try:
="FY" + RIGHT(YEAR(Date@row) - IF(Date@row < DATE(YEAR(Date@row), 6, 1), 1, 0), 2)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K 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!