LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 25 Jun 2007 22:29:18 -0700
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: Cumulative calculation observations in data step
In-Reply-To:   <200706251326.l5PAkCUi017239@mailgw.cc.uga.edu>
Content-Type:   text/plain; format=flowed

cock.verboom@UNIQEMA.COM wrote: > >Hello, > >Could someone provide me the answer how to calculate cumulative values in >columns? > >x y >1 3 >2 5 >3 7 > >Apply SAS code and the output should be: > >x y y_cum >1 3 3 >2 5 8 >3 7 15 > >Thank you in advance! > >Cornelis Verboom >The Netherlands

I see that you have received several solutions.

But if you have to do this for more than one level of some grouping variable, then it might be easier to do this using PROC EXPAND.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Who's that on the Red Carpet? Play & win glamorous prizes. http://club.live.com/red_carpet_reveal.aspx?icid=REDCARPET_hotmailtextlink3


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