<?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: Proc Report Compute Block in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46252#M12301</link>
    <description>Sorry, I left off one of the compute blocks. &lt;BR /&gt;
The two compute blocks are:&lt;BR /&gt;
compute avg; &lt;BR /&gt;
    if _c10_ &amp;lt;40 then call define ('_c9_',"style","style[foreground=yellow])";&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute rate;&lt;BR /&gt;
     if _c9_&amp;gt;14 and division in (3) then call define ('_c9_',"style","style=[background=red]");&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;quit;</description>
    <pubDate>Thu, 18 Jun 2009 05:26:13 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-06-18T05:26:13Z</dc:date>
    <item>
      <title>Proc Report Compute Block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46251#M12300</link>
      <description>My second compute block doesn't appear to be working (ie compute rate).&lt;BR /&gt;
The background is not changing to red when _c9_ &amp;gt;14.&lt;BR /&gt;
I believe the problem is the "division in (3)" condition.&lt;BR /&gt;
&lt;BR /&gt;
My other issue is that if I use both the rate compute block (without division) and the avg compute block then cells that should have yellow values with a red background just have yellow values (and no red background). Cells that should be red without yellow values are red when "division in (3)" is not specified.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
proc report data=occ nowd&lt;BR /&gt;
        style(header)=[font_weight=bold];&lt;BR /&gt;
        options missing='0';&lt;BR /&gt;
        columns division lvl9 year, (rate avg);&lt;BR /&gt;
        define division / group;&lt;BR /&gt;
        define lvl9 / group;&lt;BR /&gt;
        define year / across;&lt;BR /&gt;
        define rate / analysis;&lt;BR /&gt;
        define avg / analysis;&lt;BR /&gt;
compute avg;&lt;BR /&gt;
     if _c10_ &amp;lt;40 then call define&lt;BR /&gt;
('_c9_',"style","style=[foreground=yellow]");&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute rate;&lt;BR /&gt;
     if _c9_&amp;gt;14 and division in (3) then call define&lt;BR /&gt;
('_c9_',"style","style=[background=red]");&lt;BR /&gt;
endcomp;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=test noobs; where division in (3) and _c9_&amp;gt;14; run;&lt;BR /&gt;
division  LVL9   _C3_  _C4_ _C5_ _C6_ _C7_   _C8_ _C9_  _C10_ _BREAK_&lt;BR /&gt;
3          West     19       90    23      80   14         91   15       102&lt;BR /&gt;
3          West1    22      33    12      30   16         31   25        32</description>
      <pubDate>Thu, 18 Jun 2009 05:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46251#M12300</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-18T05:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Compute Block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46252#M12301</link>
      <description>Sorry, I left off one of the compute blocks. &lt;BR /&gt;
The two compute blocks are:&lt;BR /&gt;
compute avg; &lt;BR /&gt;
    if _c10_ &amp;lt;40 then call define ('_c9_',"style","style[foreground=yellow])";&lt;BR /&gt;
endcomp;&lt;BR /&gt;
compute rate;&lt;BR /&gt;
     if _c9_&amp;gt;14 and division in (3) then call define ('_c9_',"style","style=[background=red]");&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;quit;</description>
      <pubDate>Thu, 18 Jun 2009 05:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46252#M12301</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-18T05:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Compute Block</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46253#M12302</link>
      <description>My code isn't being posted correctly. There is a bug in this message board.&lt;BR /&gt;
I guess if you can help me based on my question that would be great.</description>
      <pubDate>Thu, 18 Jun 2009 05:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Compute-Block/m-p/46253#M12302</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-06-18T05:29:03Z</dc:date>
    </item>
  </channel>
</rss>

