Forum Discussion

mrp614's avatar
mrp614
New Member
4 years ago
Solved

Creating financial year column - How to make this code shorter and efficient?

Following code will work fine but will only cover the period from April 2019 to March 2025, is there a way to automate this code so that it generates FY as required based on the date clolumn? 
 
FY = 
IF(AND([Year]=2019, [Month]>=4), "2020",
IF(AND([Year]=2020, [Month]<=3), "2020",
IF(AND([Year]=2020, [Month]>=4), "2021",
IF(AND([Year]=2021, [Month]<=3), "2021",
IF(AND([Year]=2021, [Month]>=4), "2022",
IF(AND([Year]=2022, [Month]<=3), "2022",
IF(AND([Year]=2022, [Month]>=4), "2023",
IF(AND([Year]=2023, [Month]<=3), "2023",
IF(AND([Year]=2023, [Month]>=4), "2024",
IF(AND([Year]=2024, [Month]<=3), "2024",
IF(AND([Year]=2024, [Month]>=4), "2025",
IF(AND([Year]=2025, [Month]<=3), "2025"))))))))))))
 
Appreciate your help.
Cheers.

2 Replies