Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am doing some analysis using a fiscal calendar where the years are formatted as 2013/2014, 2014/2015 etc. These have been loaded into the script using the dual function, so each fiscal year also has a numeric value.
The problem I'm facing is that I need to create variables for current and previous year. The current year variable (=Fiscal_Year) works fine, and correctly returns the year formatted as yyyy/yyyy in a textbox. However, I'm struggling to get the previous year variable to work in the same way. I've set the variable as =Fiscal_Year-1, this returns the correct numeric value for the fical year, but I can;t get it to return in the text box in the required yyyy/yyyy format. I've tried adding text() around the statement, but to no avail.
Any help greatly appreicated!
This is the code we use:
vPreviousFiscalYear:
=num(left(MaxString(Year_Fiscal),4)-1)&'-'&num(right(MaxString(Year_Fiscal),2)-1,'00')
This is the code we use:
vPreviousFiscalYear:
=num(left(MaxString(Year_Fiscal),4)-1)&'-'&num(right(MaxString(Year_Fiscal),2)-1,'00')
Many thanks Charlotte, this has done the trick perfectly 🙂