First, sort to get the data in order. This BY statement might be overkill, because I'm not sure if DATE is character or actually represents a SAS date. It will work either way, however, AS LONG AS YOUR MONTH values are consistent. You can't store month with leading zeros just some of the time. You need to have them or omit them consistently, to get the right order: proc sort data=have; by no year month date; run; Then to get the most recent values: data want; update have (obs=0) have; by no year; drop date month; run; I have to give credit somewhere, but I'm not sure to whom. A similar solution had been proposed to a similar question at some point. Good luck.
... View more