<?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 with first last in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96722#M27275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add to Astounding's idea, if you don't have the month but have a datevalue associate a format such as MONYY. to do the grouping without having to add additional varialbes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you data set is of long enough time you probably want include the year also and the above will take care of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 19:44:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2013-06-05T19:44:36Z</dc:date>
    <item>
      <title>counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96719#M27272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have typically used the first last statement for unique counting.&amp;nbsp; I wanted to ask if there was a way to use the first last statemetn for duplicate counting as well?&amp;nbsp; For example, patientA visited clinic1 clinic2 clinic3 clinic1 clinic4 clinic1 (for a total visit of 6 visits for patientA) in month1 and PatientB visitted clinic2 clinic3 clinic1 clinic2 clinic2 (total 5 visits) in month1 for patientB and PatientC visitted clinic1 clinic3 clinic1 clinic2 clinic2 (total 5 visits) in month1 for patientC.&amp;nbsp; I want to know the number of visits by month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would have in month1 column &lt;/P&gt;&lt;P&gt;5visits=2 patients&lt;/P&gt;&lt;P&gt;6 visits=1 patient.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I use first last or is there an alternative way to approach this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96719#M27272</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T19:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96720#M27273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does your raw data/ wanted data look like? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96720#M27273</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-05T19:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96721#M27274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use first. and last. variables, if your data were sorted by MONTH PATIENT.&amp;nbsp; It wouldn't be a bad exercise to try that.&amp;nbsp; But another important tool to learn is that PROC FREQ is built to count, and can create output data sets.&amp;nbsp; This report won't be pretty, but it will have the information in it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables month * patient / noprint out=counts;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=counts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables month * count;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; label count='Patients with this Number of Visits';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96721#M27274</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-05T19:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96722#M27275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add to Astounding's idea, if you don't have the month but have a datevalue associate a format such as MONYY. to do the grouping without having to add additional varialbes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you data set is of long enough time you probably want include the year also and the above will take care of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96722#M27275</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-06-05T19:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96723#M27276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data looks like this but at a more grander scale.&amp;nbsp;&amp;nbsp; The dollar amounts are co-pays but Im not interested in that.&amp;nbsp; I want to know how many patients made 5 visits to clinics or 6 visits to clinics etc.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month= January&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 320px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;patient&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;clinic1&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;clinic2&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;clinic3&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="64"&gt;clinic4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$65 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$125 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$458 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$760 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$1,025 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-left: medium none; border-top: medium none;"&gt;$2,065 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;$456 &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;$598 &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;$1,095 &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;$658 &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;$354 &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-left: medium none; border-top: medium none;"&gt;$875 &lt;/TD&gt;&lt;TD class="xl71" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl71" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl71" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;358&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;510&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;450&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-left: medium none; border-top: medium none;"&gt;265&lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-left: medium none; border-top: medium none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96723#M27276</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T19:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96724#M27277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it can be done with .last&amp;nbsp; variables. I assumed the data has the structure you presented :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data visits;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;length patient visit $10;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;infile datalines missover;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input patient visit @;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;do while (not missing(visit));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input visit @;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;patientA clinic1 clinic2 clinic3 clinic1 clinic4 clinic1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;PatientB clinic2 clinic3 clinic1 clinic2 clinic2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;PatientC clinic1 clinic3 clinic1 clinic2 clinic2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;STRONG&gt;data nbVisits(drop=visit);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;do until(last.patient);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set visits; by patient notsorted;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nbVisits = sum(nbVisits, 1);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=nbVisits; by nbVisits; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data visitStats(drop=patient);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;do until(last.nbVisits);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set nbVisits; by nbVisits;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nbPatients = sum(nbPatients, 1);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print noobs; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96724#M27277</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-05T19:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96725#M27278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I have considered proc freq but i am interested in the number of patients making the total number of clinic visits per month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my data example above I would want to know&lt;/P&gt;&lt;P&gt;there were 2 patients visited the clinic 5 times in January and 1 patient visiting 6 clinics in January.&lt;/P&gt;&lt;P&gt;5 clinic visits= 2 patients&lt;/P&gt;&lt;P&gt;6 clinic visits=1 patient&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 19:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96725#M27278</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T19:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96726#M27279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow!&amp;nbsp; Thanks PG-&amp;nbsp; it worked.&amp;nbsp; So its a two data step part counting until reaching the last record for both steps.&amp;nbsp; Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96726#M27279</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T20:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96727#M27280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's what the second PROC FREQ gives you.&amp;nbsp; If you actually have a separate file for each month, but don't have a variable called MONTH, the program becomes easier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=january;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables patient / noprint out=counts;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=counts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables count;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title 'Number of Patients with N Visits in January';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96727#M27280</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-05T20:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96728#M27281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohh double wow!&amp;nbsp; Thanks Astounding- thats an even easier approach.&amp;nbsp;&amp;nbsp; No separate file for each month- so how would I produce the counts by month using the proc freq procedure?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96728#M27281</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T20:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96729#M27282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't this work as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = visits ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class patient ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename = (_freq_ = visits)) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96729#M27282</guid>
      <dc:creator>SteveNZ</dc:creator>
      <dc:date>2013-06-05T20:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96730#M27283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could add month easy as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = visits ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class month patient ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename = (_freq_ = visits)) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96730#M27283</guid>
      <dc:creator>SteveNZ</dc:creator>
      <dc:date>2013-06-05T20:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96731#M27284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To include MONTH as a variable, just use the first posted solution.&amp;nbsp; You might want to play with the format of the output from the second PROC FREQ, such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables month * count / LIST;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve, that's just my bias.&amp;nbsp; I prefer to use PROC FREQ to count and PROC SUMMARY to generate statistics.&amp;nbsp; But there is an area where their capabilities overlap.&amp;nbsp; At any rate, you would need a second summarization of your output data set to count how many patients had 5 visits, how many had 6 visits, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 20:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96731#M27284</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-05T20:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96732#M27285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are only interested in the number of visits and the number of patients who have that visits, then Proc SQL also has approach: (raw data stoled from PG's post):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data visits;&lt;/P&gt;&lt;P&gt;length patient visit $10;&lt;/P&gt;&lt;P&gt;infile datalines missover;&lt;/P&gt;&lt;P&gt;input patient visit @;&lt;/P&gt;&lt;P&gt;do while (not missing(visit));&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input visit @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;patientA clinic1 clinic2 clinic3 clinic1 clinic4 clinic1&lt;/P&gt;&lt;P&gt;PatientB clinic2 clinic3 clinic1 clinic2 clinic2&lt;/P&gt;&lt;P&gt;PatientC clinic1 clinic3 clinic1 clinic2 clinic2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select ct as visits, count(*) as patient_num from&lt;/P&gt;&lt;P&gt;&amp;nbsp; (select count(*) as ct from visits group by patient)&lt;/P&gt;&lt;P&gt;group by ct;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96732#M27285</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-05T21:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96733#M27286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for responding.&amp;nbsp; This one isnt quite what I had in mind.&amp;nbsp; I did not need each patient displayed.&amp;nbsp; I need the number of patients and the number of clinics visited each month.&amp;nbsp;&amp;nbsp; So below would read- two patients made 5 clinic visits and 1 patient made 6 clinic visits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;number of visits&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number of patients&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96733#M27286</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T21:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96734#M27287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Astounding-&amp;nbsp; I just realized that the frequency unduplicated the counts (counted a clinic only once).&amp;nbsp; I need every clinic counted for each patient.&amp;nbsp;&amp;nbsp; Do you think I can still use the frequency procedure? . &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96734#M27287</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T21:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96735#M27288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haikuo-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL command seemed to have worked.&amp;nbsp; I gave an example for January, however, I am interested in getting counts for the remaining months.&amp;nbsp; Can you help me with the SQL coding on where I should include the variable 'month' to produce similar counts for each month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96735#M27288</guid>
      <dc:creator>SAS_new</dc:creator>
      <dc:date>2013-06-05T21:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96736#M27289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select month, ct as visits, count(*) as patient_num from&lt;/P&gt;&lt;P&gt;&amp;nbsp; (select count(*) as ct, month from visits group by month,patient)&lt;/P&gt;&lt;P&gt;group by month,ct;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not tested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:05:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96736#M27289</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-05T22:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: counting with first last</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96737#M27290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably more elegant ways but:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length month patient visit $10;&lt;/P&gt;&lt;P&gt;infile datalines missover;&lt;/P&gt;&lt;P&gt;input month patient visit @;&lt;/P&gt;&lt;P&gt;do while (not missing(visit));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input visit @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;January patientA clinic1 clinic2&lt;/P&gt;&lt;P&gt;January PatientB clinic2 clinic3 clinic1 clinic2 clinic2&lt;/P&gt;&lt;P&gt;January PatientC clinic1 clinic3 clinic1 clinic2 clinic2 clinic3&lt;/P&gt;&lt;P&gt;February patientA clinic1 clinic2 clinic3 clinic1 clinic4 clinic1&lt;/P&gt;&lt;P&gt;February PatientB clinic2 clinic3 clinic1 clinic2 clinic2&lt;/P&gt;&lt;P&gt;February PatientC clinic1 clinic3 clinic1 clinic2 clinic2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class month patient ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = tmp_want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename = (_freq_ = visits)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc summary noprint nway n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = tmp_want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class month visits ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out = want (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop = _type_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rename = (_freq_ = patients)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/counting-with-first-last/m-p/96737#M27290</guid>
      <dc:creator>SteveNZ</dc:creator>
      <dc:date>2013-06-05T22:06:08Z</dc:date>
    </item>
  </channel>
</rss>

