| Date: | Sun, 23 Mar 2008 18:53:55 +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 |
|
| In-Reply-To: | <4bc14e460803230042y728cba64j611a174525c3bfef@mail.gmail.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
sorry I meant class not group..
proc means data=libname.datasetname sum;
class ZONE;
Var SALES;
run;
On Sun, Mar 23, 2008 at 1:12 PM, ajay ohri <ohri2007@gmail.com> wrote:
> 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
> >
>
>
|