Sorry, I just realized that my have data set may not have been clear. The days in the data set are not cumulative, so if I create a cumulative total it would look like the one below. The want data set has the dates when each person first had > 30 days. 1 has 33 on 15Jan2015, person 2 has 60 on 02Feb2015 and person 3 never has > 30, so doesn't show up in want. data have; input id visitdt days totdays; cards; 1 02DEC2014 3 3 1 01JAN2015 15 18 1 15JAN2015 15 33 2 02JAN2015 30 30 2 02FEB2015 30 60 2 01MAR2015 30 90 2 02APR2015 30 120 3 16DEC2014 3 3 3 30DEC2014 3 6 3 01JAN2015 3 9 3 16JAN2015 3 12 3 30JAN2015 3 15 3 01FEB2015 3 18 ;
... View more