Hi:
Your only numeric variables are ID and AGE. Are you going to summarize AGE? That doesn't seem to serve any purpose. However, you'd need to make all your changes in a COMPUTE block. Here's an example, just keep in mind that the reason for having all the IF statements in the COMPUTE block for WEIGHT is that all the variables have been placed on the report row by the time the COMPUTE block for WEIGHT will be executed, so rather than having separate IF statements in separate COMPUTE blocks for each variable, you can do it all in the COMPUTE block for the last variable. Note that the reason WEIGHT is not summarized is that it is defined as a DISPLAY item on the report. So only AGE and HEIGHT will be summarized.
options missing=' ';
proc report data=sashelp.class;
column name sex age height weight;
define name / order;
define sex / display;
define age / analysis;
define height / analysis;
define weight / display;
rbreak after / summarize;
compute weight;
if name = 'Alfred' then do;
sex = ' ';
weight = .;
call define('sex','style','style={background=yellow}');
call define('weight','style','style={background=yellow}');
end;
else if name = 'Barbara' then do;
weight = .;
call define('weight','style','style={background=yellow}');
end;
else if name = 'John' then do;
sex = ' ';
weight = .;
call define('sex','style','style={background=yellow}');
call define('weight','style','style={background=yellow}');
end;
endcomp;
run;
I added the yellow highlighting so it was visible what had been "turned off" in each of the 3 report rows.
Cynthia
... View more