Hi,
Here is one possible solution for your problem. Try to customize based on your requirement.
data temp;
infile datalines;
input ANUM JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC TOTAL_FAIL 5.2;
datalines;
4299 40 20 27 37 25 32 26 24 22 28 17 33 27.58
4264 30 30 36 15 17 27 27 30 25 27 14 24 25.17
4246 19 24 40 18 32 18 20 19 24 16 14 25 22.42
4281 16 18 31 23 17 24 27 20 19 26 13 27 21.75
41786 21 43 33 21 20 21 26 21 11 11 13 14 21.25
4080 16 19 21 16 13 23 13 18 21 17 27 20 18.67
4262 17 14 23 16 30 22 20 18 26 11 9 10 18.00
1789 19 19 14 10 21 19 24 17 18 24 9 14 17.33
4315 20 11 28 17 18 19 11 22 17 25 5 11 17.00
4297 16 11 17 15 14 14 15 16 28 12 6 26 15.83
4279 17 15 16 11 14 14 8 15 14 15 8 8 12.92
4042 15 6 8 6 3 9 13 19 8 3 5 10 8.75
41787 4 4 9 9 3 8 8 19 16 8 10 7 8.75
2377 10 6 11 4 13 11 4 8 9 4 4 7 7.58
4241 6 5 9 5 7 7 6 12 6 7 3 4 6.42
;
run;
proc report data=temp nowd;
column ANUM TOTAL_FAIL JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ;
define ANUM /display;
define JAN / display;
define FEB /display;
define MAR /display;
define APR /display;
define MAY /display;
define JUN /display;
define JUL /display;
define AUG /display;
define SEP /display;
define OCT /display;
define NOV /display;
define DEC /display;
define TOTAL_FAIL /display;
compute JAN;
if JAN > TOTAL_FAIL then
call define(_col_,'style','style={foreground=red}');
endcomp;
compute FEB;
if FEB > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute MAR;
if MAR > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute APR;
if APR > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute MAY;
if MAY > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute JUN;
if JUN > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute JUL;
if JUL > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute AUG;
if AUG > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute SEP;
if SEP > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute OCT;
if OCT > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute NOV;
if NOV > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
compute DEC;
if DEC > TOTAL_FAIL then
call define(_col_,"style","style={foreground=red}");
endcomp;
run;
Thanks
Dhanasekaran R
Allianz Cornhill Information Services,
Trivandrum,
India