My second compute block doesn't appear to be working (ie compute rate).
The background is not changing to red when _c9_ >14.
I believe the problem is the "division in (3)" condition.
My other issue is that if I use both the rate compute block (without division) and the avg compute block then cells that should have yellow values with a red background just have yellow values (and no red background). Cells that should be red without yellow values are red when "division in (3)" is not specified.
Any suggestions?
proc report data=occ nowd
style(header)=[font_weight=bold];
options missing='0';
columns division lvl9 year, (rate avg);
define division / group;
define lvl9 / group;
define year / across;
define rate / analysis;
define avg / analysis;
compute avg;
if _c10_ <40 then call define
('_c9_',"style","style=[foreground=yellow]");
endcomp;
compute rate;
if _c9_>14 and division in (3) then call define
('_c9_',"style","style=[background=red]");
endcomp;
proc print data=test noobs; where division in (3) and _c9_>14; run;
division LVL9 _C3_ _C4_ _C5_ _C6_ _C7_ _C8_ _C9_ _C10_ _BREAK_
3 West 19 90 23 80 14 91 15 102
3 West1 22 33 12 30 16 31 25 32