<?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: Counting the number of items within same date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461896#M117527</link>
    <description>Thanks&lt;BR /&gt;</description>
    <pubDate>Sun, 13 May 2018 23:39:51 GMT</pubDate>
    <dc:creator>strqimr</dc:creator>
    <dc:date>2018-05-13T23:39:51Z</dc:date>
    <item>
      <title>Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461499#M117422</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I am working on a dataset with participants having multiple rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if any participant have used a specific medicare item number more than once in a same day. For example participant T10002 have used "36" twice in the same date (3rd and 4th rows).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20455i4074CB0E14DB676A/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.JPG" alt="4.JPG" /&gt;&lt;/span&gt;Thanks mates&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 08:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461499#M117422</guid>
      <dc:creator>strqimr</dc:creator>
      <dc:date>2018-05-11T08:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461512#M117423</link>
      <description>&lt;P&gt;In SQL (there are other ways) this would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select participant_id, medicare_item_number, date_of_service, count(date_of_service)
   from have
   group by participant_id, medicare_item_number, date_of_service
   having count(date_of_service) &amp;gt; 1;&lt;BR /&gt;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps,- Jan.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 10:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461512#M117423</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-05-11T10:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461515#M117424</link>
      <description>&lt;P&gt;How about&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input subject$ med item$ date$;
    datalines;
    T10002 23 A1 8/3/2009
    T10002 23 A1 10/26/2009
    T10002 36 A1 12/9/2009
    T10002 36 A1 12/9/2009
    T10002 110 A4 12/16/2009
    T10002 116 A4 1/12/2009
    ;
run;
proc sort data=test out=test_1;
    by subject item date;
run;
proc freq data=test_1 noprint;
    tables med / out=cnt;
    by subject item date;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 May 2018 11:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461515#M117424</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-11T11:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461556#M117432</link>
      <description>&lt;P&gt;Do you want a data set, something that goes into other procedures for analysis, or a report for humans? Do want to see the counts of everything or only the cases where there are two or more of the item on the same date?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And are your "dates" actually SAS date values or just character variables that look like dates?&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 14:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461556#M117432</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-11T14:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461895#M117526</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2018 23:38:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461895#M117526</guid>
      <dc:creator>strqimr</dc:creator>
      <dc:date>2018-05-13T23:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of items within same date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461896#M117527</link>
      <description>Thanks&lt;BR /&gt;</description>
      <pubDate>Sun, 13 May 2018 23:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-the-number-of-items-within-same-date/m-p/461896#M117527</guid>
      <dc:creator>strqimr</dc:creator>
      <dc:date>2018-05-13T23:39:51Z</dc:date>
    </item>
  </channel>
</rss>

