Date: Tue, 5 Jan 2010 13:11:02 -0800
Reply-To: Sdlentertd <sdlentertd@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sdlentertd <sdlentertd@GMAIL.COM>
Organization: http://groups.google.com
Subject: Properly Flagging items based on multiple conditions
Content-Type: text/plain; charset=ISO-8859-1
I have this dataset and I am looking to flag items for the same store
with the same R-number but that went from =>90 to <90 on days
Have:
STORE R-NUMBER DAYS date
1212 456 20 01jan2010
1212 468 90 01jan2010
1212 456 90 02jan2010
1212 468 30 02jan2010
2566 468 10 03jan2010
1212 456 30 04jan2010
So first I need to look at the stores to make sure I am analyzing the
same store, then I am looking at R-Number and if it's the same then
look at DAYS and Date, if it went from 90 to less (based on Date) then
Flag it.
Want:
STORE R-NUMBER DAYS date FLAG
1212 456 20 01jan2010
1212 468 90 01jan2010 Y
1212 456 90 02jan2010
1212 468 30 02jan2010
2566 468 10 03jan2010
1212 456 30 04jan2010 Y
(the last one is Y because at first it was 20 then it went to 90 and
then went DOWN to 30)
Thanks for any help