data work.resiSorted;
set work.resi;
by ID Career descending Term;
run;
I am having many columns in work.resi.
My data get sorted as I wish.
When I want to get the 1st ID/career/Term details of the observation:- it is not working;
proc sort data= work.resisorted;
by ID;
if first.id;
Hi @USHAKS Do you mean you are after this by any chance
proc sort data=work.resi out=resi_sorted;
by id career descending term;
run;
data work.want;
set work.resi_sorted;
by ID ;
if first.id;
run;
Yes.
Okay good, I'm glad we figured the need. Thanks!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.