Date: Mon, 26 Jul 1999 11:53:38 +0200
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
Subject: Re: Cumulative
Content-type: text/plain; charset=us-ascii
there are at least three ways of doing what do you need.
1st method: using a doif..endif construct together with lag function
do if $CaseNum eq 1.
2nd method: using a scratch variable
3rd method: using the leave command
Hope this helps,
Tim.Cooper@AVIS-EUROPE.COM on 26/07/99 10.03.53
Please respond to Tim.Cooper@AVIS-EUROPE.COM
cc: (bcc: Fabrizio Arosio/RRL/IT)
How do you compute a cumulative value in a new variable?
For example, I have a variable called Revenue sorted ascending. In the
column, I want to calculate a cumulative value. How do I achieve this?
I've played around with LAG, but can't get it to work. I have 670,000
records, so I can't attempt it in Excel.
Group Marketing Data Analyst
Avis Europe Plc
Park Road, Bracknell,
Berkshire, UK RG12 2EW
* Direct Line: +44 (0)1344 417317