Hi,
I need the total sum for each column displayed at the very bottom
data:
site col1 col2 col3
A 2 3 6
B 2 4 7
C 2 5 8
want:
site col1 col2 col3
A 2 3 6
B 2 4 7
C 2 5 8
Total 6 12 21
proc print data=have ;
var site col1-col3;
sum col1-col3 ;
run;
Do you want this in a report or in a SAS data set?
I think this does what you need. https://communities.sas.com/t5/SAS-Programming/Proc-Report-Grand-Total/td-p/538641
ods rtf file="filepath";
/*proc report code goes here*/
ods rtf close;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.