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!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.