11-10-2017 09:58 AM
data inter; set have; mnth=month(f1); run; proc sort data=inter out=want; by mnth descending b; run; data want; set want; by mnth; if first.mnth; run;
Or you could do it in SQL by
proc sql; create table WANT as select * from have group by month(f1) having b=max(b); quit;
Or proc summary, or means.
11-10-2017 10:25 AM
He never mentioned that, if so just change the month() function for a put():
proc sql; create table WANT as select * from have group by put(f1,mmyy6.) having b=max(b); quit;
Obviously not tested as don't have time to type his test data in.
Need further help from the community? Please ask a new question.