<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to highlight values in a table using SAS? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/602117#M23463</link>
    <description>&lt;P&gt;Proc report builds things from top to bottom left to right.&lt;/P&gt;
&lt;P&gt;When you have this column statement:&lt;/P&gt;
&lt;PRE&gt;column var1 var2 maxvar1 minvar2;
&lt;/PRE&gt;
&lt;P&gt;Then this compute&lt;/P&gt;
&lt;PRE&gt;compute var1;
if var1 = maxvar1 then do;
call define (_col_, "style", "style={background=peachpuff}");
end;
endcomp;
&lt;/PRE&gt;
&lt;P&gt;does not actually have a value of maxvar1 to use since maxvar1 is to the right of var1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try changing the order of variables in the column statement so the maxvars come before var1 and var2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 19:13:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-11-06T19:13:45Z</dc:date>
    <item>
      <title>How to highlight values in a table using SAS?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/601816#M23458</link>
      <description>&lt;P&gt;Hi SAS community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to highlight certain values within my SAS table. I want to highlight the maximum value for one variable and the minimum value for another variable. For example if I have two variables, var1 and var2, in which I want the maximum value highlighted for var1 and minimum value highlighted for var2, the resulting table will look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var1 | var2&lt;/P&gt;&lt;P&gt;---------------&lt;/P&gt;&lt;P&gt;40% | &lt;FONT color="#ff0000"&gt;10%&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;50% | 20%&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;60%&lt;/FONT&gt; | 30%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 21:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/601816#M23458</guid>
      <dc:creator>mzhao</dc:creator>
      <dc:date>2019-11-05T21:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight values in a table using SAS?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/601818#M23459</link>
      <description>&lt;P&gt;PROC REPORT allows this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p0xcdcilo2yuuwn1t9uks2c1e66e.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p0xcdcilo2yuuwn1t9uks2c1e66e.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 21:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/601818#M23459</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-05T21:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight values in a table using SAS?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/602025#M23461</link>
      <description>&lt;P&gt;Hi Paige,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used PROC SQL to store maximum/minimum values of the variables, but PROC REPORT is still not highlighting the max/min values. Here's a sample of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have nowd;
title 'title'
column var1 var2 maxvar1 minvar2;
define var1/display;
define var2/display;
define maxvar1/display noprint;
define minvar2/display noprint;
compute var1;
if var1 = maxvar1 then do;
call define (_col_, "style", "style={background=peachpuff}");
end;
endcomp;
compute var2;
if var2 = minvar2 then do;
call define (_col_, "style", "style={background=peachpuff}");
end;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 15:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/602025#M23461</guid>
      <dc:creator>mzhao</dc:creator>
      <dc:date>2019-11-06T15:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight values in a table using SAS?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/602117#M23463</link>
      <description>&lt;P&gt;Proc report builds things from top to bottom left to right.&lt;/P&gt;
&lt;P&gt;When you have this column statement:&lt;/P&gt;
&lt;PRE&gt;column var1 var2 maxvar1 minvar2;
&lt;/PRE&gt;
&lt;P&gt;Then this compute&lt;/P&gt;
&lt;PRE&gt;compute var1;
if var1 = maxvar1 then do;
call define (_col_, "style", "style={background=peachpuff}");
end;
endcomp;
&lt;/PRE&gt;
&lt;P&gt;does not actually have a value of maxvar1 to use since maxvar1 is to the right of var1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try changing the order of variables in the column statement so the maxvars come before var1 and var2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 19:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-highlight-values-in-a-table-using-SAS/m-p/602117#M23463</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-06T19:13:45Z</dc:date>
    </item>
  </channel>
</rss>

