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;
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
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!