Hi, I am trying to sum up observations by group processing but after writing below code it's only giving me below the last line as output. libname a "&path"; proc sort data = a.data out=a.data1;
by CTYPE;
Run;
data a.processing(keep=Sales _Other);
set a.data1;
by CTYPE;
if first.CTYPE then Sales=0;
Sales + _Other;
if last.CTYPE;
Run;
proc print data = a.processing;
run; after running code, there was only last line number of group produced as output. Thanks.
... View more