Date: Wed, 11 Mar 2009 14:26:14 -0400
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: Re: Column totals
In-Reply-To: <1e2b5d0e-6508-47a8-a5e6-3bc2c331ba25@40g2000prx.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello KK,
I Could able to create dataset so this solution is not tested but
Easiest method I can think of is
Proc Sql Noprint;
Create table Total as
Select sum(Jan) as Jan, Sum(Feb) as feb ,Sum(dec) as Dec .......(Total
Number of Months)
From <Your table>
Group by Jan,Feb,Mar <Months> ;
Quit ;
You get One Row for whole dataset then do a Simple Set and you would able
to get it
Data <Final_data> ;
Set <Original_dataset> Total;
Run;
Hope this is helpful.
thanks
SL
On Wed, Mar 11, 2009 at 2:05 PM, <kk.majji@gmail.com> wrote:
> Please help me in getting the total only for all the SUM columns in
> the below table.
>
>
> Sep Oct Nov
> Dec Jan Feb
> Sum count Sum count Sum count Sum count Sum count
> Sum count Total Sum
> abc 871 655 690 491 524 363 499 363 1280
> 899 680 414 ?
> dfd 420 163 415 147 399 159 459 170 655
> 183 631 192 ?
> lmn 21 14 27 11 25 16 19 11
> 46 25 34 16 ?
> Total 1388 879 1143 660 958 546 991 553 1991
> 1117 1347 624 ?
>
> Thanks,
> KK.
>
|