<?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: computed column in proc report in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204678#M2753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Proc REPORT requires a "compound name" when you use ANALYSIS variables in a COMPUTE block. So, for example, your current COMPUTE block does NOT use a compound name in the assignment statement of the form:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #000000;"&gt;newvar&lt;/SPAN&gt; = variable-name&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;statistic &lt;SPAN style="color: #000000;"&gt;.... rest of expression;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; So your COMPUTE block should be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;compute ratio;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ratio = &lt;SPAN style="color: #0000ff;"&gt;height&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;mean&lt;/SPAN&gt;/&lt;SPAN style="color: #0000ff;"&gt;Weight&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;mean&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There is a section in the doc about PROC REPORT that explains about the PROC REPORT and the compound name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2015 15:26:28 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-07-16T15:26:28Z</dc:date>
    <item>
      <title>computed column in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204677#M2752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone tell me why my ratio variable doesn't show any value. Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowindows headline headskip;&lt;/P&gt;&lt;P&gt;columns name sex age height weight ratio;&lt;/P&gt;&lt;P&gt;define name / display 'Name' width=10;&lt;/P&gt;&lt;P&gt;define sex / group 'Sex' width=6;&lt;/P&gt;&lt;P&gt;define age / analysis mean 'Age' width=4;&lt;/P&gt;&lt;P&gt;define height / analysis mean 'Height' format=8.1;&lt;/P&gt;&lt;P&gt;define weight / analysis mean 'Wight' format=8.1;&lt;/P&gt;&lt;P&gt;define ratio / computed format=6.2;&lt;/P&gt;&lt;P&gt;compute ratio;&lt;/P&gt;&lt;P&gt;ratio = height/Weight;&lt;/P&gt;&lt;P&gt;endcompute;&lt;/P&gt;&lt;P&gt;break after sex / ol&amp;nbsp; summarize skip suppress;&lt;/P&gt;&lt;P&gt;rbreak after/summarize dol dul;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204677#M2752</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-07-16T14:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: computed column in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204678#M2753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Proc REPORT requires a "compound name" when you use ANALYSIS variables in a COMPUTE block. So, for example, your current COMPUTE block does NOT use a compound name in the assignment statement of the form:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #000000;"&gt;newvar&lt;/SPAN&gt; = variable-name&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;statistic &lt;SPAN style="color: #000000;"&gt;.... rest of expression;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; So your COMPUTE block should be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;compute ratio;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ratio = &lt;SPAN style="color: #0000ff;"&gt;height&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;mean&lt;/SPAN&gt;/&lt;SPAN style="color: #0000ff;"&gt;Weight&lt;/SPAN&gt;.&lt;SPAN style="color: #ff00ff;"&gt;mean&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There is a section in the doc about PROC REPORT that explains about the PROC REPORT and the compound name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 15:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204678#M2753</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-07-16T15:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: computed column in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204679#M2754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Cynthia, that's helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 16:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/computed-column-in-proc-report/m-p/204679#M2754</guid>
      <dc:creator>mlogan</dc:creator>
      <dc:date>2015-07-16T16:09:46Z</dc:date>
    </item>
  </channel>
</rss>

