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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Oct 2008 18:04:51 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: Finding the sum of values under variables
Comments: To: Kwame Asom <asom77@HOTMAIL.COM>

Kwame,

There are numerous ways. I, personally, would use:

PROC means data=Dataset1 sum; var ama kofi; output out=sums sum=; run;

HTH, Art ------- On Thu, 23 Oct 2008 17:07:35 -0400, Kwame Asom <asom77@HOTMAIL.COM> wrote:

>Dataset1 >Obs ama kofi >1 797.1 60.22 >2 18.99 45.30 >3 896.3 46.32 >4 14.65 89.67 >5 79.54 563.2 >6 88.56 2569.3 >7 145.3 58996.23 >.. >700 45.32 189.3 > >I have the above dataset(dataset1) and I want to find the sum of all the >values under each variable (ama and kofi separately). Ie. For ama I need >the total of all the values : 797.1 + 18.99 + 896.3 +...... 45.32. >For kofi: 60.22 + 45.30 + 89.67 +........189.3. >I have 700 observations, only 8 are shown above. >*Could someone help me with the SAS code to find the sum of values under >ama and kofi above, please?


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