<?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 How to count the frequency of a value by unique ID's in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-the-frequency-of-a-value-by-unique-ID-s/m-p/344229#M272996</link>
    <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Medicare data and trying to figure out a way to find the number of unique ids (there are several duplicate bene_ids) with one condition (back_pn_office_visit=1).&amp;nbsp; The following code for unique bene_ids works, but I can't figure out how to add the condition.&amp;nbsp; Any ideas?&amp;nbsp; Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select count (distinct bene_id) as in 'n_id' from back_analysis_2013A;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where does&lt;/EM&gt; 'back_pn_office_visit=1' &lt;EM&gt;go&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Mar 2017 00:34:52 GMT</pubDate>
    <dc:creator>moreilly</dc:creator>
    <dc:date>2017-03-25T00:34:52Z</dc:date>
    <item>
      <title>How to count the frequency of a value by unique ID's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-the-frequency-of-a-value-by-unique-ID-s/m-p/344229#M272996</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Medicare data and trying to figure out a way to find the number of unique ids (there are several duplicate bene_ids) with one condition (back_pn_office_visit=1).&amp;nbsp; The following code for unique bene_ids works, but I can't figure out how to add the condition.&amp;nbsp; Any ideas?&amp;nbsp; Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select count (distinct bene_id) as in 'n_id' from back_analysis_2013A;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where does&lt;/EM&gt; 'back_pn_office_visit=1' &lt;EM&gt;go&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2017 00:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-the-frequency-of-a-value-by-unique-ID-s/m-p/344229#M272996</guid>
      <dc:creator>moreilly</dc:creator>
      <dc:date>2017-03-25T00:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the frequency of a value by unique ID's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-the-frequency-of-a-value-by-unique-ID-s/m-p/344233#M272997</link>
      <description>&lt;P&gt;Some of your syntax is off. I think you want something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
  select count (distinct sex) as n_id
    from sashelp.class
      where age gt 12
  ;
quit;
 
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2017 01:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-the-frequency-of-a-value-by-unique-ID-s/m-p/344233#M272997</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-25T01:14:22Z</dc:date>
    </item>
  </channel>
</rss>

