I need to create a "Weekday Total" that sums up the Weekdays (Sun- Sat) at the end(bottom) of the report output. I know I need to add a compute and possibly an rbreak, but I am not sure how to do this. Thanks in advance!
PROC REPORT NOWD DATA=WORK.WEEKLY_TOTALS BOX SPLIT='\'
STYLE (HEADER)={JUST=center FOREGROUND=white BORDERCOLOR=BLACK BACKGROUND=#201F73 font_weight=bold}
STYLE (REPORT)={CELLSPACING=5 BORDERCOLOR=BLACK};
TITLE1 "QA Sendbacks - Weekday Totals";
/*TITLE2 'UM PROJECTS';*/
COLUMNS LOB CLIENT SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY WEEKLY_TOTAL;
define LOB / DISPLAY style(column)=[cellwidth=0.70in];
DEFINE CLIENT / DISPLAY "CLIENT" style(column)=[cellwidth=2.0in];
define SUNDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define MONDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define TUESDAY/ DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define WEDNESDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define THURSDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define FRIDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define SATURDAY / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
define WEEKLY_TOTAL / DISPLAY FORMAT=COMMA9. style(column)=[cellwidth=0.65in];
compute LOB;
count+1;
if mod(count,2) then do;
call define(_row_, "style", "style=[background=grayf0]");
end;
endcomp;
run;
quit;
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.