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 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 5 Apr 2007 21:18:53 -0700
Reply-To:   RolandRB <rolandberry@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   RolandRB <rolandberry@HOTMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Proc Report + total population should change when by group changes
Comments:   To: sas-l@uga.edu
In-Reply-To:   <200704051631.l35FJSEd000491@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset="iso-8859-1"

On 5 Apr, 18:31, sasq...@GMAIL.COM (SAS Ques) wrote: > Dear All, > I want the tot_pop(consider tot_pop as a macro variable) in column > statement to change when bygrpc changes. > > Obs TRT AGE_gp TOT_pop > > 1 A 1 114 > 2 A 2 69 > 3 A 3 170 > 4 A 4 13 > > 5 P 1 101 > 6 P 2 69 > 7 P 3 164 > 8 P 4 6 > > proc report data=final split="|" headline headskip nowd; > title8 "byvar. : #byval(bygrpc)"; > by bygrpc ; > column (("Druga 150mg/300mg|--N=&tot_pop.--" a1b a2b a3b) > ("Placebo|--N=&tot_pop. --" p1b p2b p3b)); > > Is it possible to do this way. Please help me. Thanks is advance.

I can't see a way of getting it to work like that. I get this to work by making multiple calls to proc report by subsetting on the by group and recalculating the total each time.

http://www.datasavantconsulting.com/roland/spectre/uniwithby.html


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