Huge thanks to Jane Eslinger from SAS Technical Support for solving my problem with the following code: proc report data=COUNTS_BY_WEEK nowd style(summary)=[font_weight=bold];
column dummy WEEKOF cv1 WEEKNUMBER cv2 APPROVED DENIED DEFICIENT TOTALAPPDETERM;
define dummy / group noprint;
define WEEKOF / group format=MMDDYYS10. missing noprint order=internal;
define cv1 / computed 'Week of:' missing;
compute cv1 / char length=30;
if _break_ eq ' ' then do;
if WEEKOF ne . then hold1=WEEKOF;
cv1=put(hold1,MMDDYYS10.);
end;
if _break_ ne ' ' then cv1=' ';
endcomp;
define WEEKNUMBER / group missing noprint;
define cv2 / computed 'Week #' missing;
compute cv2 / char;
if _break_ eq ' ' then do;
if WEEKNUMBER ne . then hold2=WEEKNUMBER;
cv2=put(hold2,8.);
end;
if _break_ = '_RBREAK_' then cv2='Percent';
if upcase(_break_)='DUMMY' then cv2='Total';
endcomp;
define APPROVED / analysis SUM 'Approved' format=COMMA9. missing;
define DENIED / analysis SUM 'Denied' format=COMMA9. missing;
define DEFICIENT / analysis SUM 'Deficient' format=COMMA9. missing;
define TOTALAPPDETERM / analysis SUM 'Total Application Determinations' format=COMMA9. missing;
rbreak after / summarize; *this now gives the percent row;
break after dummy / summarize; *this gives the total row;
compute after; *this will change the percent row to have the values you need;
approved.sum = approved.sum / TOTALAPPDETERM.sum;
denied.sum = denied.sum / TOTALAPPDETERM.sum;
deficient.sum = deficient.sum / TOTALAPPDETERM.sum;
TOTALAPPDETERM.sum = TOTALAPPDETERM.sum / TOTALAPPDETERM.sum;
*change formatting;
call define('approved.sum','format','percent8.1');
call define('denied.sum','format','percent8.1');
call define('deficient.sum','format','percent8.1');
call define('TOTALAPPDETERM.sum','format','percent8.1');
endcomp;
run;
quit; Hopefully this can help someone else as well.
... View more