<?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: I need to count just one visit per client and per week. How can I do that in Enterprise Guide? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202349#M15195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way. A format to create groups by week within client and count, then count the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=work;&lt;/P&gt;&lt;P&gt;picture yearweek (default=8)&lt;/P&gt;&lt;P&gt;other= '%Y/%0U' (datatype=date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables client * date /list norow nocol nopercent out=temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format date yearweek. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The set TEMP will have one record per client per week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't provide an example of what the final output(s) might look like but you can get a total of clients per week by summarizing the Temp dataset variable date. A count of client would give you the total unique clients in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=temp;&lt;/P&gt;&lt;P&gt;tables date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2015 15:11:13 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-07-15T15:11:13Z</dc:date>
    <item>
      <title>I need to count just one visit per client and per week. How can I do that in Enterprise Guide?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202345#M15191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't resolve this problem. I have a list of clients visits in a three months period and I need to count those visits one per client and per week. I have only today and last week's Friday dates and the dates of the clients visits.&lt;/P&gt;&lt;P&gt;How can I list one visit per client and per week in SAS Enterprise Guide?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202345#M15191</guid>
      <dc:creator>Aniteb</dc:creator>
      <dc:date>2015-07-14T15:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: I need to count just one visit per client and per week. How can I do that in Enterprise Guide?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202346#M15192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any rule such as the earliest or latest visit or do you require a single random selection if there are more than one visit per week?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 16:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202346#M15192</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-14T16:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need to count just one visit per client and per week. How can I do that in Enterprise Guide?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202347#M15193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the SORT Task in EG and the unique options there. &lt;/P&gt;&lt;P&gt;You may need to sort twice, the first time to get the data in the order you want and the second so you can take the first record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 17:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202347#M15193</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-14T17:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: I need to count just one visit per client and per week. How can I do that in Enterprise Guide?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202348#M15194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It can be the earliest visit. I don't have a specific rule for that, I just want to count one visit per week.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 13:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202348#M15194</guid>
      <dc:creator>Aniteb</dc:creator>
      <dc:date>2015-07-15T13:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: I need to count just one visit per client and per week. How can I do that in Enterprise Guide?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202349#M15195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way. A format to create groups by week within client and count, then count the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=work;&lt;/P&gt;&lt;P&gt;picture yearweek (default=8)&lt;/P&gt;&lt;P&gt;other= '%Y/%0U' (datatype=date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables client * date /list norow nocol nopercent out=temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format date yearweek. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The set TEMP will have one record per client per week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't provide an example of what the final output(s) might look like but you can get a total of clients per week by summarizing the Temp dataset variable date. A count of client would give you the total unique clients in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=temp;&lt;/P&gt;&lt;P&gt;tables date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 15:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/I-need-to-count-just-one-visit-per-client-and-per-week-How-can-I/m-p/202349#M15195</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-15T15:11:13Z</dc:date>
    </item>
  </channel>
</rss>

