I have a set of data that looks like this: ID Status31Jan2007 Status28Jan2007 Status31Mar2007
001 0 0
002 1 0 0
003 1 1 0 I want to get results like this: ID Flag1 Flag2 Flag3
001 N N N
002 Y N N
003 Y Y N The logic is, if as at Status31Jan2007 = 1 and the following two months, count of Status fields with 0 > 0, then flag it as 'Y'. Else, N. Note that I have up to 118 months in my dataset. After getting the results, how do I count the number of flags N and Y under each fields? Count1 Count2 Count3
N 1 2 3
Y 2 1 0 Would appreciate the help as I am new to SAS. Thanks.
... View more