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 (April 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 12 Apr 2008 21:07:44 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: simple calculation?

On Sun, 13 Apr 2008 02:47:56 +0200, JH <jhtet@YAHOO.DK> wrote:

>Hi > >I have to calculate how much is used on beds, chairs, sofas and carpets a >year according to colour. > >I have tried to use the proc transpose to make the best datasheet, but I >couldn't make a sheet where I could use the sum-formula. How do I calculate >it in the best way? > >DATA furn; > > INPUT id $ cost year colour $; > > CARDS; > > sofa 21 1 red > > sofa 10 0 blue > > sofa 43 0 green > > bed 87 4 blue > > bed 12 1 black > > bed 32 4 red > > chair 11 1 blue > > chair 2 2 green > > chair 12 4 green > > carpet 2 1 red > > carpet 15 0 black > > carpet 23 0 white > > ; > > run; > >Best regards JH

Don't transpose. Your data structure is already most advantageous. Use PROC TABULATE.


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