09-14-2013 06:21 AM
I am trying to prepare a report in PDF where in one matrix in need to apply color coding based on value. Which we can do in Excel conditional formatting 3-color scale based on percentile. Is it possible to do color coding in SAS.
09-14-2013 08:54 AM
3 colors..... that is trafficlights. like:
Use that searchword at the SAS support site together with ODS and conditional markup
Bi dashbord has the whole focus on that kind of presentation of data
09-15-2013 05:39 AM
To display the Hex colours in SAS Log use:
proc registry list startat="colornames";
You can use the code below as an example and build from it...
/* view pdf file : http://www.okstate.edu/sas/v8/saspdf/gref/c07.pdf
for colour palette */
ODS rtf file='empdata.rtf' STYLE=sasweb;
proc report data=sasuser.empdata nowd out=work.test ;
column Division Location Salary;
define Division / group 'Division';
define Location / group 'Location';
define Salary / analysis mean 'Average Salary' format=dollar8.;
if Salary.mean <= 30000 then /* Sets Low Risk (Green) */
else if Salary.mean >= 65000 then /* Sets High Risk (Red) */
CALL DEFINE(_COL_,"STYLE", /* Sets Medium Risk (Yellow) */
ODS rtf CLOSE;
09-16-2013 11:30 AM
I use this method for a tabular report that I run.
low - 5 = 'cxfef0d9'
5.01 - 10 = 'cxfdcc8a'
10.01 - high = 'cxfc8d59'