<?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: CALL DEFINE - Highlighting cells of the column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483564#M125407</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sale nowindows missing headline headskip out=test;
    column country (region prodtype) , predict;
    define country / group;
    define region / across;
    define prodtype / across;
    rbreak after / summarize skip ol;
    compute region;
        if _c2_&amp;gt;_c3_ then call define (_col_, "style", "style={background=yellow}");
    endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Aug 2018 19:54:09 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-08-02T19:54:09Z</dc:date>
    <item>
      <title>CALL DEFINE - Highlighting cells of the column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483559#M125406</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am stuck with highlighting some cells of a column based on a comparison of cells of another column. In the following code I tried to use CALL DEFINE so that it highlights when column _c2_ is bigger than _c3_. Can someone help me please.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
CREATE TABLE sale AS 
SELECT country, 
	   region, 
       prodtype, 
       product, 
	   actual LABEL=''FORMAT=comma10.2,
	   predict LABEL=''FORMAT=comma10.2,
	   month
FROM sashelp.prdsale 
WHERE mod(monotonic(),75)=0
ORDER BY ranuni(94612);
QUIT;

PROC REPORT DATA=sale NOWINDOWS MISSING HEADLINE HEADSKIP OUT=test;
COLUMN country (region prodtype) , predict;
DEFINE country / GROUP;
DEFINE region / ACROSS;
DEFINE prodtype / ACROSS;
RBREAK AFTER / SUMMARIZE SKIP ol;
COMPUTE predict;
    IF _c2_&amp;gt;_c3_.sum THEN CALL DEFINE (_Col_, "style", "style={background=Yellow}");
ENDCOMP;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 19:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483559#M125406</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2018-08-02T19:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: CALL DEFINE - Highlighting cells of the column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483564#M125407</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sale nowindows missing headline headskip out=test;
    column country (region prodtype) , predict;
    define country / group;
    define region / across;
    define prodtype / across;
    rbreak after / summarize skip ol;
    compute region;
        if _c2_&amp;gt;_c3_ then call define (_col_, "style", "style={background=yellow}");
    endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 19:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483564#M125407</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-02T19:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: CALL DEFINE - Highlighting cells of the column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483567#M125408</link>
      <description>&lt;P&gt;it worked for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; IF _c2_&amp;gt; _c3_ and country = ' ' THEN CALL DEFINE (_Col_, "style", "style={background=Yellow}");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 20:01:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483567#M125408</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-08-02T20:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: CALL DEFINE - Highlighting cells of the column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483861#M125541</link>
      <description>Hi PaigeMiller, Thanks for the code, but it is not producing the output according to the logic. With the logic IF _c2_&amp;gt;_c3_, the cell containing 1,982.00 should be highlighted only, but it is not working that way. Would you please look into it. Thanks.</description>
      <pubDate>Fri, 03 Aug 2018 16:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483861#M125541</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2018-08-03T16:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: CALL DEFINE - Highlighting cells of the column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483862#M125542</link>
      <description>Hi Kiranv, Thanks for the code, but it is not producing the output according to the logic. It is highlighting the total column. With the logic IF _c2_&amp;gt;_c3_, the cell containing 1,982.00 should be highlighted only, but it is not working that way. Would you please look into it. Thanks.</description>
      <pubDate>Fri, 03 Aug 2018 16:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CALL-DEFINE-Highlighting-cells-of-the-column/m-p/483862#M125542</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2018-08-03T16:51:39Z</dc:date>
    </item>
  </channel>
</rss>

