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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 18 Jul 2006 13:27:11 -0700
Reply-To:     BK <byronkirby@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         BK <byronkirby@GMAIL.COM>
Subject:      Re: Ranges-tiers-date
Comments: To:
In-Reply-To:  <>
Content-Type: text/plain; charset="iso-8859-1"

Assuming that I'm reading your question right, here is the most basic approch... (code not run.)

data Ds2; set Ds1; if date LT '22May2005'd then DateCat="Prior"; else if date GT '22May2005'd then DateCat="Post"; *** not there is not Cat for the date'22May2005'd

if CHGS >100 then tier=1; else if CHGS >200 then tier=2; Else... run;

proc sql; select DateCat, Tier, sum(CHGS) from Ds2 Group by DateCat, Tier; quit; run; wrote: > I have this data: > dates and $$$ > i need to break down my data before '22May2005'd and after '22May2005'd > AND > by tiers: $100, $200, $300, $500, $1000 (SUM) > > So the output will look like > date Tier SUM amount > '22May2005'd $100 $1,222 (pretend) > $200 $3,555 > $300 $22,000 > > data test; > set sas.sample > ????

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