Hi - I need to highlight a variance (cell) that is >=15% or <=-15%. Below is the sample and code. Please help. Thanks.
ODS EXCEL;
PROC REPORT Data=DATA1
COLUMNS First Group Second Group Date_MMYYYY, TOTAL_COUNT Date_MMYYYY,VARIANCE;
define FIRST GROUP / group 'First group' ORDER = INTERNAL;
define SECOND GROUP / group 'Second Group' ORDER = INTERNAL;
define DATE_MMYY / across '';
define TOTAL_COUNT / analysis '' format=comma20.;
define VARIANCE / analysis '' format=percent8.2;
Run;
title;
ods excel close;
You can try a COMPUTE block like this one:
Or you can try custom formats, this paper does a great job explaining all the different implementation options.
https://www.lexjansen.com/wuss/2006/tutorials/TUT-Carpenter.pdf
@DLROW wrote:
Hi - I need to highlight a variance (cell) that is >=15% or <=-15%. Below is the sample and code. Please help. Thanks.
ODS EXCEL;
PROC REPORT Data=DATA1
COLUMNS First Group Second Group Date_MMYYYY, TOTAL_COUNT Date_MMYYYY,VARIANCE;
define FIRST GROUP / group 'First group' ORDER = INTERNAL;
define SECOND GROUP / group 'Second Group' ORDER = INTERNAL;
define DATE_MMYY / across '';
define TOTAL_COUNT / analysis '' format=comma20.;
define VARIANCE / analysis '' format=percent8.2;Run;
title;ods excel close;
Thanks all. I went through those papers and I got what I need.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.