<?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 proc report conditionally formatting summarize results in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-conditionally-formatting-summarize-results/m-p/585270#M75785</link>
    <description>&lt;P&gt;Hello, I am currently presenting some results in proc report and intend to apply some conditional formatting to a summarize result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using proc report for its ease in exporting the figures to latex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written below the following code::&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc report data= SASHELP.SHOES
style(header)=[color=black  fontfamily=helvetica fontsize=1 background=yellow fontweight=bold];
column region Stores;
define region / "region" display style(column)=[width=2cm] group;
define stores/"stores" display style(column)=[width=3.5cm] mean; 
rbreak after/ summarize style=Header;
compute after;
region="Mean";
endcomp;

compute stores;
if _break_="_RBREAK_" then do;
	if stores &amp;gt;= 5 then call define('stores.mean','style','style={backgroundcolor=green}');
	else if stores &amp;lt; 5 then call define('stores.mean','style','style={backgroundcolor=yellow}');
	else if stores &amp;lt; 2 then call define('stores.mean','style','style={backgroundcolor=red}');
end;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My issue is the output (mean) of stores (mean=11.648) should have a background colour "green", given the "if" condition. I am unable to figure out why it is "Yellow".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2019 16:14:11 GMT</pubDate>
    <dc:creator>sebster24</dc:creator>
    <dc:date>2019-08-30T16:14:11Z</dc:date>
    <item>
      <title>proc report conditionally formatting summarize results</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-conditionally-formatting-summarize-results/m-p/585270#M75785</link>
      <description>&lt;P&gt;Hello, I am currently presenting some results in proc report and intend to apply some conditional formatting to a summarize result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using proc report for its ease in exporting the figures to latex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written below the following code::&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc report data= SASHELP.SHOES
style(header)=[color=black  fontfamily=helvetica fontsize=1 background=yellow fontweight=bold];
column region Stores;
define region / "region" display style(column)=[width=2cm] group;
define stores/"stores" display style(column)=[width=3.5cm] mean; 
rbreak after/ summarize style=Header;
compute after;
region="Mean";
endcomp;

compute stores;
if _break_="_RBREAK_" then do;
	if stores &amp;gt;= 5 then call define('stores.mean','style','style={backgroundcolor=green}');
	else if stores &amp;lt; 5 then call define('stores.mean','style','style={backgroundcolor=yellow}');
	else if stores &amp;lt; 2 then call define('stores.mean','style','style={backgroundcolor=red}');
end;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My issue is the output (mean) of stores (mean=11.648) should have a background colour "green", given the "if" condition. I am unable to figure out why it is "Yellow".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 16:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-conditionally-formatting-summarize-results/m-p/585270#M75785</guid>
      <dc:creator>sebster24</dc:creator>
      <dc:date>2019-08-30T16:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc report conditionally formatting summarize results</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-conditionally-formatting-summarize-results/m-p/585298#M75786</link>
      <description>If you have not found the error yourself yet use:&lt;BR /&gt;    if stores.mean ...&lt;BR /&gt;    else if stores.mean ...&lt;BR /&gt;    else if stores.mean ...</description>
      <pubDate>Fri, 30 Aug 2019 17:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-conditionally-formatting-summarize-results/m-p/585298#M75786</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-08-30T17:21:49Z</dc:date>
    </item>
  </channel>
</rss>

