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 (March 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 23 Mar 2008 13:12:31 +0530
Reply-To:     ajay ohri <ohri2007@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         ajay ohri <ohri2007@GMAIL.COM>
Subject:      Re: Reformat output
Comments: To: Mark <mfmfisher@gmail.com>
In-Reply-To:  <5fa7690f-1593-44ca-a100-a989edd0f341@m34g2000hsc.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

Try this;

proc means data=libname.datasetname sum; group ZONE; Var SALES; run;

On Sun, Mar 23, 2008 at 10:34 AM, Mark <mfmfisher@gmail.com> wrote:

> Hi, > > I am a newbie to SAS. I would appreciate any help or pointers in this > regard. > > I have a SALES dataset that is as follows. > > Group Zone SALES > Group 1 North 10,345 > Group 1 South 5,578 > Group 1 East 6,834 > Group 1 West 7,500 > Group 2 North 5,000 > Group 2 South 4,600 > Group 2 East 6,700 > Group 2 West 2,000 > Group 3 North 15,000 > Group 3 South 1,200 > Group 3 East 22,000 > Group 3 West 10,000 > > > I need to reformat the output such that I could print that sales > information by each zone as follows. > > Zone Group1 Group2 Group3 > North 10,345 5,000 15,000 > South 5,578 4,600 1,200 > East 6,834 6,700 22,000 > West 7,500 2,000 10,000 > Overall 30,257 18,300 48,200 > > I looked at transposing the dataset but that does not help. Not sure > if I am heading in the right direction or not. > > Thanks, > > Mark >


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