<?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: Summing # of dates for one patient in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279767#M56423</link>
    <description>&lt;P&gt;You still want the long list of calls? Try this then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table calls as
select *, count(*) as nbCalls
from myData
group by id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Jun 2016 16:30:29 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-06-23T16:30:29Z</dc:date>
    <item>
      <title>Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279572#M56353</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have multiple dates for a person making a phone call. I want to sum the number of calls per patient into a different variable (total number of calls per patient), rather than having multiple dates listed with the same person's ID listed multiple times:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 AP001 23AUG2014&lt;/P&gt;&lt;P&gt;2 AP002 29APR2013&lt;/P&gt;&lt;P&gt;3 AP002 23OCT2013&lt;/P&gt;&lt;P&gt;4 AP002 01NOV2013&lt;/P&gt;&lt;P&gt;5 AP002 01NOV2013&lt;/P&gt;&lt;P&gt;6 AP002 14AUG2014&lt;/P&gt;&lt;P&gt;7 AP002 05SEP2014&lt;/P&gt;&lt;P&gt;8 AP002 22SEP2014&lt;/P&gt;&lt;P&gt;9 AP002 22JAN2015&lt;/P&gt;&lt;P&gt;10 AP002 06APR2015&lt;/P&gt;&lt;P&gt;11 AP002 13JUL2015&lt;/P&gt;&lt;P&gt;12 AP002 16JUL2015&lt;/P&gt;&lt;P&gt;13 AP003 25MAR2013&lt;/P&gt;&lt;P&gt;14 AP003 11AUG2013 ...etc.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 21:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279572#M56353</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2016-06-22T21:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279574#M56354</link>
      <description>&lt;P&gt;It's a frequency count&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at PROC FREQ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 21:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279574#M56354</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-22T21:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279575#M56355</link>
      <description>Would I than have to do a proc freq though for each person's ID?</description>
      <pubDate>Wed, 22 Jun 2016 21:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279575#M56355</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2016-06-22T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279576#M56356</link>
      <description>&lt;P&gt;No, put the ID in the PROC FREQ, either as a BY or in the Table statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try either to see which generates the table you're interested in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have noprint;
table id/out=want;
run;

proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 22:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279576#M56356</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-22T22:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279632#M56373</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table calls as
select id, count(*) as nbCalls
from myData
group by id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 03:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279632#M56373</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-23T03:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279753#M56421</link>
      <description>&lt;P&gt;I'd actually really like to create a new variable with number of calls... how would I do that?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 15:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279753#M56421</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2016-06-23T15:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Summing # of dates for one patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279767#M56423</link>
      <description>&lt;P&gt;You still want the long list of calls? Try this then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table calls as
select *, count(*) as nbCalls
from myData
group by id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 16:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summing-of-dates-for-one-patient/m-p/279767#M56423</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-23T16:30:29Z</dc:date>
    </item>
  </channel>
</rss>

