Hello everyone,
Is it possible to apply this function that I have in Excel in EG?
regards,
Hans
I think you can use a combination of BY group processing and the LAG function to get the results you want.
proc sort data=one;by number;run;
data two;set one;by number; y=lag(code);if first.number then y=.;run;
April 27 - 30 | GAYLORD TEXAN
Register now to lock in early bird pricing through February 25!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.
Browse our catalog!