Since all numeric variables are by default ANALYSIS variables, you can not use "age" to access the value but rather "age.sum". You can also define age to be a DISPLAY variable and then your code will work. See example below: proc report data=sashelp.class nowd; column name age sex weight; define age / display; compute age; if age in (13,15) then call define("age","style","Style={background=yellow}"); endcomp; compute sex; if sex='M' then call define(_row_,"style","style={background=green}"); endcomp; run; You can also add a dummy column and do all the processing in just one compute block, this will make it easier if the logic gets more complicated, see also an example below: proc report data=sashelp.class nowd; column name age sex weight _dummy; define _dummy / noprint; compute _dummy; if sex='M' then do; call define(_row_,"style","style={background=green}"); end; if age.sum in (13, 15) then do; call define("age.sum","STYLE","Style={background=yellow}"); end; endcomp; run;
... View more