BookmarkSubscribeRSS Feed
AnuragSharma
Calcite | Level 5

I would like to know how to make fiscal year

11 REPLIES 11
morgalr
Obsidian | Level 7

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.

ballardw
Super User

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.

data_null__
Jade | Level 19

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.

fiscal = intnx('YEAR.10',date,0);
format fiscal year.;
MichelleHomes
Meteorite | Level 14

There has been a discussion in another thread on how to do calculations based on fiscal year or financial year...

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
PeterWijers
Lapis Lazuli | Level 10

in addition to Michelle,

development, make it happen.....

greetings

ted_werner_sas_com
SAS Employee

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

PeterWijers
Lapis Lazuli | Level 10

Hi Ted,

Thanks for your reply, good to experience the improvements and discus the ideas. This is what the community is all about...Smiley Happy

Greetings

AndiWindisch
Calcite | Level 5

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

Frank_Boekamp
Quartz | Level 8

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

MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
mhamlett
Quartz | Level 8

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"

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 11 replies
  • 10949 views
  • 9 likes
  • 10 in conversation