The SAS Output Delivery System and reporting techniques

Need help on conditionallu hightlighting the output

Reply
Contributor sss
Contributor
Posts: 65

Need help on conditionallu hightlighting the output

============================================================
ANUM JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC TOTAL_FAIL
============================================================
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
============================================================

Hello Friends

I want to conditionally highlight the cell.
In col(ANUM) is number for asset and values in MONTH(Jan,Feb....DEC) column are No. of Failures
with respective to month and TOTAL_FAIL in mean on all month.

I want to highlight the values whose values are greater then TOTAL_FAIL With respect to ANUM col as Red or some other color.

ex:-in 1st row i want to highlight the values 40,37,32,28,33
in 2nd col i want to highlight the values 30,30,30,27,27,27

------------------------------------------------------------------------------------
/* Code goes here but , i m not getting actual output */
-------------------------------------------------------------------------------
I 'll be very thankful for you suggestion
ODS HTML FILE='TEMP.HTML';
goption reset=all ctext=black ftext="verdana/bold" htext=1 ;
title1 color=cx003366 justify=left j=c font=verdana bold height=3 "C CHART for # Failures for Asset by Month";;
title2 color=darkblue font=verdana justify=c height=1 justify=RIGHT font=verdana bold italic "Run Date: %sysfunc(date(),mmddyy.)";
title3 j=left '____________________________________________________________________________';
title4 color=black font=verdana bold j=left height=2
'Description :' FONT=VERDANA ' Control charts, also known as Shewhart charts, in statistical process control are tools used to determine whether a
manufacturing or business process is in a state of statistical control or not. In this report C-chart is used to monitor number of failures for an' ;
title5 color=black font=verdana j=left height=1 ' Assumption : 1) The inspection procedure is same for each sample and is carried out consistently from sample to sample.';
title6 color=black font=verdana j=left height=1' 2) Number of failures follows Poisson distribution';
title7 j=left '____________________________________________________________________________';
symbol v = dot color = GREEN ;
goptions cback=white vsize=5.0 hsize=8 ftext=verdana xpixels=600 ypixels=300;

option font="verdana" ;

axis1 value=(height=0.6 color=DARKBLUE font="verdana/bold") label=(height=1 color=ORANGE font="verdana/bold" 'Month');;
axis2 value=(height=0.6 color=DARKBLUE font="verdana/bold") label=(height=1 angle=90 color=ORANGE font="verdana/bold");


proc report data=_demo4 nowd split='/'
style(report)={font_face= ' verdana ' font_size=2 bordercolor=white}
style(Header)=[ background=cx003366 foreground =white bordercolor=darkblue FONT_FACE='verdana' FONT_SIZE=2.5 FONT_WEIGHT=Bold CELLSPACING=1 ]
style (column)={just=center font_face='verdana' FONT_WEIGHT=Bold bordercolor=white background=white font_size= 2 };
column ORGID SITEID LOCATION ASSETNUM DESCRIPTION JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ;
define JAN/display "JAN";
define FEB/display "FEB";
define MAR/display "MAR";
define APR/display "APR";
define MAY/display "MAY";
/*define fail_date / display "fail_date";
define _SUBC_ / display "No_failure";
define _LCLC_ / display "Lower Limit";
define _UCLC_ / display "Upper Limit";
define _EXLIM_ / display "Limit Exceed";*/
compute JAN ;
if JAN OR FEB OR MAR OR APR GE TOTAL_FAILURES then do;
call define(_COL_,'STYLE','STYLE=[foreground=red]');
end;
else
call define(_COL_,'STYLE','STYLE=[foreground=black]');

endcomp;
run;
ODS HTML CLOSE;
SAS Super FREQ
Posts: 8,745

Re: Need help on conditionallu hightlighting the output

Hi:
You have not answered the questions I asked in this post, nor addressed the issues that I pointed out here:
http://support.sas.com/forums/thread.jspa?threadID=12619&tstart=0

Also, there is no need to make the same posting multiple times. It only makes your posting(s) hard to follow:
http://support.sas.com/forums/thread.jspa?threadID=12444&tstart=0
http://support.sas.com/forums/thread.jspa?threadID=12624&tstart=0
http://support.sas.com/forums/thread.jspa?threadID=12620&tstart=0

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 145 views
  • 0 likes
  • 2 in conversation