You can do it in one step of a SQL procedure. This is assuming you're date column is already converted into a character field:
data have;
input date$ test tes1 col2 col4;
datalines;
1/3/2015 4 2 0 1
4/5/2015 2 7 9 0
;
run;
proc sql;
create table want as
select date,
test,
tes1,
col2,
col4,
sum(test,tes1,col2,col4) as total
from have
union
select "Total" as date,
sum(test) as test,
sum(tes1) as tes1,
sum(col2) as col2,
sum(col4) as col4,
sum(sum(test,tes1,col2,col4)) as total
from have;
quit;
Hope this is helps!
... View more