LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Jan 2009 14:46:12 +0000
Reply-To:     karma <dorjetarap@GOOGLEMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         karma <dorjetarap@GOOGLEMAIL.COM>
Subject:      Re: Need help ASAP
Comments: To: BILL WEST <wm_a_west@yahoo.com>
In-Reply-To:  <444688.61418.qm@web34303.mail.mud.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1

The OP seems to want counts of unique counts, so I don't think a basic freq or summary will work. If you want to use procs I think you will need 2 passes through the data. Alternatively use Arthurs sql suggestion.

Happy new year all!

data have; input facility $ member; cards; sas 12 sad 34 ret 45 sad 56 sad 56 ;run; proc summary data=have nway; class facility member; output out=intermediate(keep=facility); run; proc freq data=intermediate; tables facility/noprint out=want(drop=percent); run;

2009/1/2 BILL WEST <wm_a_west@yahoo.com>: > I dont have access to sas now so didn't try it but you're right, the sum= won't work. However I think the _freq_ variable that is output should be same as the total number of unique facility member combinations. > > With kind regards, > > Bill West > > > --- On Fri, 1/2/09, John Chapman <john.chapman@VIRGINBROADBAND.COM.AU> wrote: > > From: John Chapman <john.chapman@VIRGINBROADBAND.COM.AU> > Subject: Re: Need help ASAP > To: SAS-L@LISTSERV.UGA.EDU > Date: Friday, January 2, 2009, 8:36 AM > > Will that proc summary work with sum= but no var statement? > > BILL WEST wrote: >> Some corrections: >> >> Proc summary NWAY data=facilitymember; >> class facility member; >> output out=whatever sum=; >> >> PROC FREQ DATA=whatever; >> TABLES facility/NOPRINT OUT=something (KEEP=facility COUNT); >> RUN; >> >> >> >> , Jay Jacob Wind <jay.wind@ATT.NET> wrote: >> >> From: Jay Jacob Wind <jay.wind@ATT.NET> >> Subject: Need help ASAP >> To: SAS-L@LISTSERV.UGA.EDU >> Date: Thursday, January 1, 2009, 7:40 PM >> >> >>> Date: Wed, 31 Dec 2008 13:46:41 -0800 >>> From: sdlenter >>> Subject: Need help ASAP >>> >>> I have a dataset >>> facility member >>> sas 12 >>> sad 34 >>> ret 45 >>> sad 56 >>> sad 56 >>> >>> I need to have a list of all facilities with a count of unique members >>> for each: >>> >>> sas 1 >>> sad 2 >>> ret 1 >>> >> >> PROC FREQ DATA=whatever; >> TABLES facility/NOPRINT OUT=something (KEEP=facility COUNT); >> RUN; >> -- >> -- Thank you >> -- Jay Jacob Wind >> >> >> >> >> >> >> >> >> >> > > > > >


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