Date: Wed, 29 Aug 2001 21:02:53 +0800
Reply-To: kit <biefiles@SKIM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: kit <biefiles@SKIM.COM>
Organization: IMS Netvigator
Subject: Calculation within the same variable
If I have a SAS output as follow, and I want to calculate two things:
1) sum of ent, tv, file, news (let this sum be "subtotal")
2) rest=(grand-subtotal)
***Please note that the subtotal and rest are not "NEW VARIABLLE", but one
of the items within the
same varibable "theme"
How can I output it in SAS?
THEME and SCORE are variables
Original SAS output
THEME SCORE
ent 5210
tv 1234
file 56
news 789
grand 12300
Wanted to output as follows
THEME SCORE
ent 5210
tv 1234
file 56
news 789
subtotal 7289
grand 12300
rest 5011
Thanks a lot!!!!
|