Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incrementing timeframes

Status
Not open for further replies.

sasuser6

Programmer
May 1, 2011
1
US
I have a situation where I need to take a file of account data and determine when the first occurrence of a specific event occurred and then measure performance for each account for 24 months after that particular event occurred.

For example I may have one account where the event occurred in May 2007 and need to designate that as month 1 and pull in the next 24 months of data for that account.

However, I may also have an account for which that specific event occurred in July of 2010 and wouldn't have a full 24 months of performance available after that occurrence, but would need to then pull in however many months are available after the event.

I haven't been able to come up with any ideas for this yet. Any suggestions are greatly appreciated.
 
You need to follow the steps below;

1. Get all the accounts and events into one dataset
2. sort that Dataset by account no and month (remember you need to convert month field into date field)
3. Then its simple datastep processing with first. and last. on account number and retain statement on counter variable to go upto maximum 24

sasbuddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top