BookmarkSubscribeRSS Feed
AnuragSharma
Calcite | Level 5

I want to calculate the running total for a year in SAS

5 REPLIES 5
TejaSurapaneni
Lapis Lazuli | Level 10

Hi Anurag,

You want to calculate for financial year or calander year.

Teja surapaneni

RDHamm
Fluorite | Level 6

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

AnuragSharma
Calcite | Level 5

How would I calculate the financial year in SAS EG i.e from april 2014 to march 2015

RDHamm
Fluorite | Level 6

There are two ways I have done this.  Each is to have a Category called "Fiscal Year"

FiscalYear.jpg

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)

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
  • 5 replies
  • 2506 views
  • 0 likes
  • 4 in conversation