hi! Currently, I am trying to use PROC REPORT to product a report that contains a grand totals row at the bottom (sum of each column). First, I created a table containing the data using PROC SQL:
--------------------------------------------------------------------------------------------
proc sql;
create table tbl_AP as
select
Grl,
count(PI) as Total,
count (AR) as Inis
from w.empWFA
where OCP= 3
group by Grl;
quit;
--------------------------------------------------------------------------------------------
Then, I used PROC REPORT to create the report, specifically using RBBREAK to get the grand totals:
--------------------------------------------------------------------------------------------
proc report data= tbl_AP
headline headskip;
Title1 "Distribution of People ";
column Grl Total Inis;
define Grl / group 'Gp-LV';
define Total / display;
define Inis / display;
rbreak after /summarize;
run;
--------------------------------------------------------------------------------------------
Everytime, I run this program, I get 0 errors or warnings. The table with the proper titles and labels appear, however there is never a totals row at the bottom. Instead, just an empty row at the bottom. Could anyone provide any insight on where my code is wrong?
Thanks!
hi Cynthia! This worked perfectly, thanks! Now, is there any way for me to label the final row as "grand total"? The Grl column is not numerical, and contains characters. I was hoping to put the grand total label at the end of this column, followed by the computed totals of the other two columns (inis and Total).
thanks!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.