LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 5 Jan 2007 12:07:42 -0800
Reply-To:     auto208611@HUSHMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         auto208611@HUSHMAIL.COM
Organization: http://groups.google.com
Subject:      Rolling totals in Proc Report
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

Is it possible to create rolling totals as illustrated in the following lines using Proc Report ?

Rolling Totals is the sum of the column labeled as 'OthYears(s)' after each successive 'First Year'.

So for instance, the rolling total after First Year = 1998 for 1998 only is 13689, the rolling total after First Year = 1999 is 146666 (=5248+141418) and after First Year = 2000 is 396090 (= 3572+48260+344258).

1) Total For 1998 Only 13,689

2) Total For 1998 & 1998 146,666

3) Total For 1998, 1999 & 2000 396,090

First Year OthYear(s) Counts 1998 1998 13,689 1999 5,248 2000 3,572 2001 2,636 2002 1,913 2003 1,678 2004 1,410 2005 1,360 2006 1,238 Total For 1998 Only 13,689 <------ Total Across '98 32,744

1999 1999 141,418 2000 48,260 2001 30,944 2002 22,468 2003 18,410 2004 16,308 2005 15,216 2006 13,764 Total For '98 & '99 146,666 <------ Total Across '99 306,788

2000 2000 344,258 2001 98,350 2002 65,693 2003 51,257 2004 45,319 2005 42,126 2006 37,754 Total For '98, '99 & 2000 396,090 <------ Total Across 2000 684,757


Back to: Top of message | Previous page | Main SAS-L page