Date: Wed, 28 Mar 2012 07:53:40 -0700
Reply-To: David Marso <david.marso@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Marso <david.marso@gmail.com>
Subject: Re: Summing a variable.
In-Reply-To: <1332945908454-5600750.post@n5.nabble.com>
Content-Type: text/plain; charset=us-ascii
I am correct here as well ;-)
I don't know what section or timerange are but my ID variable is merely a
proxy for such concerns.
If you were clever you could map that to an equally elegant one liner rather
than that clumsy DO IF abomination ;-))
drfg2008 wrote
>
> David,
>
> you are always right. Except this time.
>
> I have different games in one file. And this is how I would solve the
> problem:
>
> DO IF section = 1 & timeRange = 0.
> COMPUTE GOALSUM1 = Counts_PointTeam1.
> ELSE.
> COMPUTE GOALSUM1=SUM(Counts_PointTeam1,LAG(GOALSUM1)).
> END IF.
> EXECUTE.
>
>
> It works.
>
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Summing-a-variable-tp5600280p5600774.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
This email is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged and confidential. If the reader of this email message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this email in error, please notify the sender and destroy/delete all copies of the transmittal. Thank you.
This email is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged and confidential. If the reader of this email message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this email in error, please notify the sender and destroy/delete all copies of the transmittal. Thank you.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD