<?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: calculating counts of tests for months and years in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388648#M277400</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159254"&gt;@lamiaH&lt;/a&gt; wrote:&lt;BR /&gt;Thank you so much for your reply. I will try this, but I need the counts to&lt;BR /&gt;be within the data and not a result and for every month/year. I want to use&lt;BR /&gt;them later in another step. Would this work?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You may want to provide a few more lines of example data and then what the resulting data set you want would look like at the end for those given values.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2017 22:22:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-08-16T22:22:43Z</dc:date>
    <item>
      <title>calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388489#M277396</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want an advice on the best way to calculate counts of testing for each month/year.&lt;/P&gt;&lt;P&gt;So my data looks as below. I want the count of testing for each month.year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patient &amp;nbsp;tests &amp;nbsp;service date&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31Jan1992&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 23Jul1995&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 04Feb1992&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the testing count for each month in each year, so I have count for Jan, 1992 and for Feb 1992, till the latest record for 2015. the same patient may have different testing at different dates.&lt;/P&gt;&lt;P&gt;Can I sort by date first and then make a do loop of first. service date and last.service and make the sum of testing. ? Any advice how best to tackle this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much, looking forward to hear back from you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Lamia&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 14:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388489#M277396</guid>
      <dc:creator>lamiaH</dc:creator>
      <dc:date>2017-08-16T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388493#M277397</link>
      <description>&lt;P&gt;Do you have duplicates you ned to account for? If not, then you can use PROC FREQ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
format service_date yymon7.;
table service_date / out= want;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2017 15:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388493#M277397</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-16T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388639#M277398</link>
      <description>Thank you so much for your reply. I will try this, but I need the counts to&lt;BR /&gt;be within the data and not a result and for every month/year. I want to use&lt;BR /&gt;them later in another step. Would this work?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Aug 2017 22:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388639#M277398</guid>
      <dc:creator>lamiaH</dc:creator>
      <dc:date>2017-08-16T22:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388640#M277399</link>
      <description>&lt;P&gt;You can merge them back in, or if you want them directly in you could probably use SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you didn't state that initially so I'm going to leave that step up to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159254"&gt;@lamiaH&lt;/a&gt; wrote:&lt;BR /&gt;Thank you so much for your reply. I will try this, but I need the counts to&lt;BR /&gt;be within the data and not a result and for every month/year. I want to use&lt;BR /&gt;them later in another step. Would this work?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 22:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388640#M277399</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-16T22:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388648#M277400</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159254"&gt;@lamiaH&lt;/a&gt; wrote:&lt;BR /&gt;Thank you so much for your reply. I will try this, but I need the counts to&lt;BR /&gt;be within the data and not a result and for every month/year. I want to use&lt;BR /&gt;them later in another step. Would this work?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You may want to provide a few more lines of example data and then what the resulting data set you want would look like at the end for those given values.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 22:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388648#M277400</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-16T22:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388881#M277401</link>
      <description>Hi Reeza,&lt;BR /&gt;&lt;BR /&gt;Thanks for replying again, I've tried your code and it worked very nicely.&lt;BR /&gt;Sorry, I have should stated that I needed the counts. I have another&lt;BR /&gt;question for time later, but will ask it later when I will do the analysis&lt;BR /&gt;of time series.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help,&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2017 16:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/388881#M277401</guid>
      <dc:creator>lamiaH</dc:creator>
      <dc:date>2017-08-17T16:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: calculating counts of tests for months and years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/391866#M277402</link>
      <description>&lt;P&gt;Hi again,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So inorder to put this formate within the data , I 've created a nother date variable and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date=servdate;&lt;/P&gt;&lt;P&gt;format date yymon7.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;so it gave me this format within the same data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Lamia&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 14:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculating-counts-of-tests-for-months-and-years/m-p/391866#M277402</guid>
      <dc:creator>lamiaH</dc:creator>
      <dc:date>2017-08-30T14:43:58Z</dc:date>
    </item>
  </channel>
</rss>

