@efi88 Also, you could use a conditional set to mimic retain
data have;
input name$ string$ value;
cards;
aba aaaaa 12
baba bbbbb 84
caca cccc 65
gaga ddddd 52
;
data want;
set have;
if _n_=1 then set have(keep=value rename=(value=t));
diff=value-t;
drop t;
run;
... View more