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 (May 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 May 2007 14:02:50 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: How to assign ordered months by group
Comments: To: cli2@RDG.BOEHRINGER-INGELHEIM.COM
In-Reply-To:  <91A7A16D54C7C54B92398BFBA953A800015019D6@RDGEXM03.am.boehringer.com>
Content-Type: text/plain; format=flowed

Data Need ; Set Have ; By Group ; Retain MonthYear ;

If First.Group Then MonthYear = '01Jun2006'd ; Else MonthYear = ( 'Month' , MonthYear , 1 ) ;

Run ;

Toby Dunn

You can see a lot by just looking. ~Yogi Berra

Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

From: Chung Li <cli2@RDG.BOEHRINGER-INGELHEIM.COM> Reply-To: cli2@RDG.BOEHRINGER-INGELHEIM.COM To: SAS-L@LISTSERV.UGA.EDU Subject: How to assign ordered months by group Date: Thu, 10 May 2007 09:46:39 -0400

Hi all,

I have a dataset with two variables: Group, units

I'd like to assign month/year by group starting June 2006 going backward as:

Group Month units 152 6/1/2006 1.3 152 5/1/2006 0 152 4/1/2006 4 152 3/1/2006 0 152 2/1/2006 2.5 361 6/1/2006 0 361 5/1/2006 0 361 4/1/2006 1.1 361 3/1/2006 0 361 2/1/2006 0

How do I do it?

Susie Chung Li

_________________________________________________________________ More photos, more messages, more storage—get 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507


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