proc sort data=sashelp.prdsale out=consumer; where division = 'CONSUMER'; by country region; run; proc report data=consumer; title '1) testing absolute columns for ACROSS items'; column country region,prodtype,actual; define country / group; define region / across; define prodtype / across; define actual / sum; compute actual; if _c2_ gt 25000 then call define ('_c2_','style','style={background=lightyellow'); if _c4_ gt 25000 then call define ('_c4_','style','style={background=lightgreen'); endcomp; run; proc report data=consumer; column country region,prodtype,actual; title '2) also testing country value for highlight'; define country / group; define region / across; define prodtype / across; define actual / sum; compute actual; if _c2_ gt 25000 then call define ('_c2_','style','style={background=lightyellow'); if _c4_ gt 25000 then call define ('_c4_','style','style={background=lightgreen'); if country = 'CANADA' and _c4_ lt 25000 then call define ('_c4_','style','style={background=lightred'); endcomp; run;
... View more