Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

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

Reply
New Contributor
Posts: 4

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

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

Esteemed Advisor
Posts: 5,198

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

Regular Contributor
Posts: 196

Re: 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

Occasional Contributor
Posts: 6

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

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

New Contributor
Posts: 4

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

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

Occasional Contributor
Posts: 6

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

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)

Ask a Question
Discussion stats
  • 5 replies
  • 1005 views
  • 0 likes
  • 4 in conversation