How can I create a new column for an existing dataset that is the running total of an existing column - partitioned by some identifier?
ID | Value | New Val
Joe - your answer did not work for whatever reason, but got me on the right track to figure it out. Thank you!
data want;
set have;
by id;
if first.id then running_total = 0;
if first.id then retained_total = 0;
running_total = retained_total + value;
retained_total = running_total;
retain retained_total;
run;