<?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 tabulate - producing count instead of sum in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-producing-count-instead-of-sum/m-p/571389#M75297</link>
    <description>&lt;P&gt;A data source have the following fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@0050 V1028       15.    /* Peso COM pÛs estratificaÁ„o */
@0187 V403311      $1.    /* Faixa do valor do rendimento hab. */
@0098 V3002A      $1.    /* A escola que ... frequenta È de */&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;V1028 is imported correctly into SAS as a Type: Numeric with Length: 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proc tabulate data=pnadc_012019;
  class V403311 V3002A;
  var V1028;
  table V403311, V3002A;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the resulting table shows the count (N), not the sum of variable V1028.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/HZizA.png" rel="nofollow noreferrer" target="_blank"&gt;&lt;IMG src="https://i.stack.imgur.com/HZizA.png" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I instruct SAS to calculate the sum of this variable within proc tabulate?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2019 13:48:53 GMT</pubDate>
    <dc:creator>opin</dc:creator>
    <dc:date>2019-07-05T13:48:53Z</dc:date>
    <item>
      <title>proc tabulate - producing count instead of sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-producing-count-instead-of-sum/m-p/571389#M75297</link>
      <description>&lt;P&gt;A data source have the following fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@0050 V1028       15.    /* Peso COM pÛs estratificaÁ„o */
@0187 V403311      $1.    /* Faixa do valor do rendimento hab. */
@0098 V3002A      $1.    /* A escola que ... frequenta È de */&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;V1028 is imported correctly into SAS as a Type: Numeric with Length: 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proc tabulate data=pnadc_012019;
  class V403311 V3002A;
  var V1028;
  table V403311, V3002A;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the resulting table shows the count (N), not the sum of variable V1028.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/HZizA.png" rel="nofollow noreferrer" target="_blank"&gt;&lt;IMG src="https://i.stack.imgur.com/HZizA.png" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I instruct SAS to calculate the sum of this variable within proc tabulate?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 13:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-producing-count-instead-of-sum/m-p/571389#M75297</guid>
      <dc:creator>opin</dc:creator>
      <dc:date>2019-07-05T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate - producing count instead of sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-producing-count-instead-of-sum/m-p/571403#M75298</link>
      <description>&lt;P&gt;There is very little example data but following code is my guess. You can try it out and see it is giving what you want.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=pnadc_012019;
  class V403311 V3002A;
  var V1028;
  table V403311, V3002A*V1028*SUM;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jul 2019 14:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-tabulate-producing-count-instead-of-sum/m-p/571403#M75298</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-07-05T14:15:07Z</dc:date>
    </item>
  </channel>
</rss>

