01-30-2015 10:58 AM
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:
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
Please note, our observation period, month 1, is our first month of our fiscal year and does not follow the calendar year.
01-30-2015 11:07 AM
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:
do month=1 to 12;
fedfiscalyear = year(date) + (month(date) ge 10);
put date= mmddyy10. fedfiscalyear= ;
If your fiscal year of interest starts on a specific date the logic gets a bit more complicated but not much.
01-30-2015 11:45 AM
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.
02-02-2015 04:14 PM
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.
02-03-2015 12:41 AM
Thanks for your reply, good to experience the improvements and discus the ideas. This is what the community is all about...
02-03-2015 03:16 AM
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.
05-22-2015 03:57 AM
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!
05-22-2015 04:34 AM
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.
05-19-2016 10:31 AM
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"