Can someone help with this, PROC IMPORT OUT=salesByProductByDate DATAFILE= "/home/emilymoore20/EPG194/output/myTestFolder/BSA570v4_Week3_assignment_data.xlsx" DBMS=xlsx REPLACE; GETNAMES=YES; RUN; DATA salesByProductByDate; SET salesByProductByDate; year = YEAR(date); month = YEAR(date); RUN; PROC REPORT DATA=salesByProductByDate NOWD; COLUMN ('Sales' year month) product,(sales); DEFINE year / GROUP STYLE (header)={background=lightgreen}; DEFINE month / GROUP STYLE (header)={background=lightgreen}; DEFINE product / ACROSS ' ' STYLE(header)={background=lightyellow}; DEFINE sales / SUM STYLE(header)={background=lightyellow} FORMAT=DOLLAR15.2; BREAK AFTER year /SUMMARIZE DOL DUL; RBREAK AFTER/SUMMARIZE; COMPUTE AFTER year; CALL DEFINE('year','style','style=Header{pretext="SubTotal " tagattr="Type:String"}'); ENDCOMP; COMPUTE AFTER; CALL DEFINE('year','style','style=Header{pretext="Grand Total " tagattr="Type:String"}'); ENDCOMP; RUN TITLE '2015 Sales By Product'; PROC SGPLOT DATA=salesByProcudtByDate(WHERE=(year = 2015)); VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster STAT=sum DATASKIN=gloss; XAXIS DISPLAY=(nolabel noticks); YAXIS GRID; RUN; TITLE '2016 Sales By Product'; PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2016)); VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster STAT=sum DATASKIN=gloss; XAXIS DISPLAY=(nolabel noticks); YAXIS GRID; RUN; TITLE '2017 Sales By Product'; PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2017)); VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster STAT=sum DATASKIN=gloss; XAXIS DISPLAY=(nolabel noticks); YAXIS GRID; RUN; TITLE '2018 Sales By Product'; PROC SGPLOT DATA=salesByProductByDate(WHERE=(year = 2018)); VBAR product / RESPONSE=sales GROUP=month GROUPDISPLAY=cluster STAT=sum DATASKIN=gloss; XAXIS DISPLAY=(nolabel noticks); YAXIS GRID; RUN;
... View more