Data app_summary2;
Set app_summary;
Run;
Sample data output
Loan_Officer ID PCT4 stp1 ln
SMITH a100 80% 4 5
SAMPSON B50 20% 1 5
FRANKLIN C100 50% 1 2
BALDWIN D10 0% 0 5
GRAND TOTAL
MY PROC REPORT IS BELOW.
I NEED TO TOTAL THE PCT4(PERCENT COLUMN AND REFLECT THE AVG IN THIS CASE 37%
I ALSO NEED TO TOTAL THE STP1 AND LN COLUMNS FOR A GRAND TOTAL AT THE BOTTOM
I DID AN RBREAK AT THE BOTTOM HOWEVER NO TOTALS APPEAR
PROC REPORT DATA= app_summary2 headskip split='*' wrap nowd
style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]
;
COLUMN LOAN_OFFICER RACF_ID pct4 stp1 ln;
DEFINE LOAN_OFFICER / Display style(column)={cellwidth=80pt just=right} "Loan Officer";
DEFINE ID / Display style(column)={cellwidth=80pt just=right} "LO_RACF";
DEFINE pct4 / Display style(column)={cellwidth=80pt just=right} "Sum of % Sent to Processing";
DEFINE stp1 / sum Display style(column)={cellwidth=120pt just=right} "Sum of SENT_TO_PROC_BY_END_RPT_MO";
DEFINE ln / sum Display style(column)={cellwidth=80pt just=right} "Sum of CT_LN_NBR";
rbreak after /summarize;
compute after;
stp1 = 'Total';
/*ln = 'Total';*/
endcomp;
FOOTNOTE1 justify=Left Height=8pt "&FNote1";
FOOTNOTE2 justify=Left Height=8pt "&ReportName";
run;
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.