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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.