I recently had to figure out how to get the fiscal year from a date field. Surprisingly, there wasn’t an explanation and ‘copy and paste’ formula already on here (or I just couldn’t find it).
Here is my take on the challenge:
To use this -
- Make sure you have a date field to reference labeled ‘Date’.
- Add 2 new fields, one labeled ‘Fiscal Year’, and the other ‘Year’.
- Make the one labeled ‘Year’ a formula field and copy and paste the code below into the formula area.
DATETIME_FORMAT({Date}, ‘YYYY’) - Make the one labeled ‘Fiscal Year’ a formula field and copy and paste the code below into the formula area.
IF(IS_BEFORE({Date}, DATETIME_PARSE(CONCATENATE(‘06-30’, “-”, Year))), CONCATENATE("FY ", Year), CONCATENATE("FY ", VALUE(Year)+1)) - That’s it!
The end of the fiscal year in this formula is June 30th. If you have a different year end, change the ‘06-30’ in the Fiscal Year formula.
I then hide the Year field and group by fiscal years. It is great for seeing historical trends.