<?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 counting values of variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/counting-values-of-variables/m-p/23504#M5203</link>
    <description>How do I count the values of a variable for a particular customerid?&lt;BR /&gt;
Example;&lt;BR /&gt;
I need to count the value of void &amp;amp; smoke for distinct customers&lt;BR /&gt;
&lt;BR /&gt;
Customerid void smoke&lt;BR /&gt;
12001 1 2&lt;BR /&gt;
12001 1 4&lt;BR /&gt;
12001 1 3&lt;BR /&gt;
12004 1 2&lt;BR /&gt;
12004 1 4&lt;BR /&gt;
12005 1 3&lt;BR /&gt;
12005 1 3&lt;BR /&gt;
12005 1 2&lt;BR /&gt;
12006 1 4&lt;BR /&gt;
12006 1 3&lt;BR /&gt;
12007 1 2&lt;BR /&gt;
12007 1 4&lt;BR /&gt;
12007 1 3&lt;BR /&gt;
12007 1 3&lt;BR /&gt;
&lt;BR /&gt;
I have around 9999 obs in the datasets.&lt;BR /&gt;
I tried PROC SQL but didn't get expected results.&lt;BR /&gt;
Any help would be appreciated.&lt;BR /&gt;
Thanx.&lt;BR /&gt;
Priya</description>
    <pubDate>Thu, 05 Jun 2008 20:12:12 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-06-05T20:12:12Z</dc:date>
    <item>
      <title>counting values of variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-values-of-variables/m-p/23504#M5203</link>
      <description>How do I count the values of a variable for a particular customerid?&lt;BR /&gt;
Example;&lt;BR /&gt;
I need to count the value of void &amp;amp; smoke for distinct customers&lt;BR /&gt;
&lt;BR /&gt;
Customerid void smoke&lt;BR /&gt;
12001 1 2&lt;BR /&gt;
12001 1 4&lt;BR /&gt;
12001 1 3&lt;BR /&gt;
12004 1 2&lt;BR /&gt;
12004 1 4&lt;BR /&gt;
12005 1 3&lt;BR /&gt;
12005 1 3&lt;BR /&gt;
12005 1 2&lt;BR /&gt;
12006 1 4&lt;BR /&gt;
12006 1 3&lt;BR /&gt;
12007 1 2&lt;BR /&gt;
12007 1 4&lt;BR /&gt;
12007 1 3&lt;BR /&gt;
12007 1 3&lt;BR /&gt;
&lt;BR /&gt;
I have around 9999 obs in the datasets.&lt;BR /&gt;
I tried PROC SQL but didn't get expected results.&lt;BR /&gt;
Any help would be appreciated.&lt;BR /&gt;
Thanx.&lt;BR /&gt;
Priya</description>
      <pubDate>Thu, 05 Jun 2008 20:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-values-of-variables/m-p/23504#M5203</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-06-05T20:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: counting values of variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-values-of-variables/m-p/23505#M5204</link>
      <description>PROC SQL;&lt;BR /&gt;
 CREATE TABLE count AS SELECT Customeroid,&lt;BR /&gt;
 (count(void) + count(smoke)) AS count&lt;BR /&gt;
 FROM WORK.Data AS Data&lt;BR /&gt;
 GROUP BY customeroid;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
gives a count like this&lt;BR /&gt;
&lt;BR /&gt;
12001	6&lt;BR /&gt;
12004	6&lt;BR /&gt;
12005	4&lt;BR /&gt;
12006	4&lt;BR /&gt;
12007	8&lt;BR /&gt;
&lt;BR /&gt;
Is that what you were expecting or the results you didn't want?</description>
      <pubDate>Thu, 05 Jun 2008 23:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-values-of-variables/m-p/23505#M5204</guid>
      <dc:creator>rab24</dc:creator>
      <dc:date>2008-06-05T23:41:49Z</dc:date>
    </item>
  </channel>
</rss>

