I want to calculate the running total for a year in SAS
Hi Anurag,
You want to calculate for financial year or calander year.
Teja surapaneni
Hi.
One way to do this is to duplicate your date item and format it as a year.
Say you have an item called "Date" and it is daily. Right click on it, select duplicate.
Click on the new one and change the format (and the name) to Year (or month)
Use the new item in the report, and your data items will follow their aggregation methods assigned to them (average, sum, etc...)
For a financial year it is a little harder. What I have done is load a column of data that assigns each Date to a financial year, quarter, etc. Then report on those columns.
Good Luck, Roger
How would I calculate the financial year in SAS EG i.e from april 2014 to march 2015
There are two ways I have done this. Each is to have a Category called "Fiscal Year"
If you are using 7.1, you can create a custom category based off of existing categories. In the screen shot, I based my custom category off of "Occupancy Month" which are calendar months. In this case I can assign any months that I want to any Fiscal Year. NOTE: Occupancy Month is a duplicate of Occupancy Date and formatted in a Month Format.
If you are using a version prior to 7.1, you can add a column in the upload or the column editor of Fiscal Year. This column should have an entry for each of the most granular date items.
When reporting on the category Fiscal Year, your data will follow it's aggregation rules (Sum, Max, Avg, etc)
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.