Hi Everyone. I'm relatively new to SAS Programming and would like suggestions on how to solve the following problem: Lets say I have 6 months record of the total sales made by several salespeople. I will like to know the highest number of consecutive months of sales increase for each of them, during the 6 month period. Please see sample data below Id Jan Feb Mar Apr May Jun A 2 4 5 8 4 3 B 0 3 2 5 6 6 C 7 6 9 2 4 1 From the above sample date, the desired result is as follows: For row A, output will be equal to 3 ( since the longest consecutive period of increase is from Jan to Apr i.e sales increased for 3 consecutive months. For row B, output will be equal to 2 ( since the longest consecutive period of increase is from Mar to May i.e sales increased for 2 consecutive months) For row C, output will be equal to 0 ( since the sales did not increase in any consecutive months) I look forward to your suggestions.
... View more