I would like to know how to make fiscal year
We often do that with the month of our observation period. We have our first month of observation start at 1 and then by month year we increment though our observation period. This gives a convenient way to track many things including the fiscal year. Here is a format we use:
proc format;
value FYfmt
1- 12 = 1998
13- 24 = 1999
25- 36 = 2000
37- 48 = 2001
49- 60 = 2002
61- 72 = 2003
73- 84 = 2004
85- 96 = 2005
97-108 = 2006
109-120 = 2007
121-132 = 2008
133-144 = 2009
145-156 = 2010
157-168 = 2011
169-180 = 2012
181-192 = 2013
193-204 = 2014
205-216 = 2015
217-228 = 2016
229-240 = 2017
241-252 = 2018
253-264 = 2019
265-276 = 2020
;
run;
Please note, our observation period, month 1, is our first month of our fiscal year and does not follow the calendar year.
Whose fiscal year? You need to know which month of the year starts the specific organization's fiscal year.
It also helps if you have the date values you will use to base that decision on as a SAS date variable so you can use SAS date functions year and month.
For example the US Federal fiscal year starts in October (month of the year 10). So dates in a year after that belong to the next Fiscal year.
In a code example that creates some dates and the US federal fiscal year:
data _null_;
file print;
do month=1 to 12;
date=mdy(month,1,2015);
fedfiscalyear = year(date) + (month(date) ge 10);
put date= mmddyy10. fedfiscalyear= ;
end;
run;
If your fiscal year of interest starts on a specific date the logic gets a bit more complicated but not much.
Use INTNX with a shifted interval e.g. 'YEAR.10' apply this to your dates. It will return the first day of the FISCAL year in the case of YEAR.10 01OCTyear. Use YEAR format to display as 4 digit year.
in addition to Michelle,
development, make it happen.....
greetings
Hi Peter,
We are reading you guys loud and clear. You would like more flexibility and out of the box functionality for creating and maintaining time periods within Visual Analytics. We have added functionality around time based procedures and metrics in past releases, but we will look to add functionality around date formats within the application instead of having to use Base SAS or create a custom format.
Regards,
Ted Werner
Hi Ted,
Thanks for your reply, good to experience the improvements and discus the ideas. This is what the community is all about...
Greetings
Hi Ted,
thank you for your direct response. Adding something similar like the good INTNX - Function (as in Base SAS) would be a very great addition!
We have a lot of discussions with our colleagues of the financial department about different date calculations.
Regards,
Andreas Windisch
Hi Ted,
Great to hear that SAS looks into adding functionality creating and maintaining time periods within Visual Analytic. Just like Andi I like to plead for adding something like the very good INTNX - Function from SAS Base. That would help us a lot!
Regards,
Frank Boekamp
Hi Ted,
I agree with Frank! Again today I received feedback in the SAS Visual Analytics class I taught where attendees were asking to have the INTNX function and other date-based functions instead of using the TreatAsNumber and nested functions a work arounds.
Kind Regards,
Michelle
this is exactly what we want. thanks for the response to the post.
our company utilizes a conversion of a date to a period/year/accounting week format.
so Feb 1,2016 may be period 1/ year 2016/week 4/day 25 of the period
periods in my case are 28 days
we even have cases where Dec 31, 2015 is day 1/year 2016/ period 1/week 1
so i guess what im suggesting is the ability to create my own calendar in VA so that when i say convert a date to any of the available formats it uses my custom date file. so if i retrieve the MONTH of a date, it goes to the custom calendar and gets 01-13 for period 1 thru 13. the month name would simply be "Period 6"
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.