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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.