<?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 Why call define works with display variables but not with analysis variables ? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-call-define-works-with-display-variables-but-not-with/m-p/740426#M24994</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why &lt;CODE&gt;call define&lt;/CODE&gt; works with &lt;CODE&gt;display&lt;/CODE&gt; variables but not with &lt;CODE&gt;analysis&lt;/CODE&gt; variables ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class;
    column name--height;
    define name   / display;
    define sex    / display;
    define age    / display;
    *define age   / analysis mean;
    define height / analysis mean;
    
    compute age;
       if age=12 then call define(_row_,'style','style=[background=lightpink]');
    endcomp;
    
    rbreak after / summarize;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When &lt;CODE&gt;age&lt;/CODE&gt; is used as display the row where age=12 will be in lightpink, but by definition, the mean won't be available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If we change &lt;CODE&gt;age&lt;/CODE&gt; to &lt;CODE&gt;analysis&lt;/CODE&gt; mean, the mean will be calculated but the rows won't be in lightpinkt.&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 10:45:27 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2021-05-11T10:45:27Z</dc:date>
    <item>
      <title>Why call define works with display variables but not with analysis variables ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-call-define-works-with-display-variables-but-not-with/m-p/740426#M24994</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why &lt;CODE&gt;call define&lt;/CODE&gt; works with &lt;CODE&gt;display&lt;/CODE&gt; variables but not with &lt;CODE&gt;analysis&lt;/CODE&gt; variables ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class;
    column name--height;
    define name   / display;
    define sex    / display;
    define age    / display;
    *define age   / analysis mean;
    define height / analysis mean;
    
    compute age;
       if age=12 then call define(_row_,'style','style=[background=lightpink]');
    endcomp;
    
    rbreak after / summarize;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When &lt;CODE&gt;age&lt;/CODE&gt; is used as display the row where age=12 will be in lightpink, but by definition, the mean won't be available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If we change &lt;CODE&gt;age&lt;/CODE&gt; to &lt;CODE&gt;analysis&lt;/CODE&gt; mean, the mean will be calculated but the rows won't be in lightpinkt.&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 10:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-call-define-works-with-display-variables-but-not-with/m-p/740426#M24994</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2021-05-11T10:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why call define works with display variables but not with analysis variables ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-call-define-works-with-display-variables-but-not-with/m-p/740437#M24995</link>
      <description>If you are using&lt;BR /&gt;    define age   / analysis mean;&lt;BR /&gt;&lt;BR /&gt;Try :&lt;BR /&gt; compute age;&lt;BR /&gt;       if age.mean=12 then call define(_row_,'style','style=[background=lightpink]');&lt;BR /&gt;   endcomp;</description>
      <pubDate>Tue, 11 May 2021 12:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-call-define-works-with-display-variables-but-not-with/m-p/740437#M24995</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-05-11T12:04:44Z</dc:date>
    </item>
  </channel>
</rss>

