You can use FIRST. to find the first value in a group and LAST. to find the last value in a group. Example:
data want;
set have;
by value;
if last.value then do; ...; end;
if first.value then do; ...; end;
run;
-- Paige Miller
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
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!