<?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: Distinct counts in Summary Table in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186566#M14278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't show any date-related field in your example data. What is the field called and what does it contain?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a date, and your field is called date, you might be able to use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select count(distinct guestnumber) as number,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&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; month(date) as month&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by month(date)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 20:17:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2015-02-27T20:17:46Z</dc:date>
    <item>
      <title>Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186561#M14273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have rows of data with common unique IDs.&amp;nbsp; In Summary Table, how do I show a count of distinct IDs not row?&amp;nbsp; Se image below for how my data looks like.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/9382_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 18:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186561#M14273</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-02-27T18:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186562#M14274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what your asking but, if the answer is 3 and your dataset is called have, then the following would work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select count(distinct guestnumber)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 19:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186562#M14274</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-02-27T19:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186563#M14275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm asking for 3.&amp;nbsp; Now how do I make Summary Tables show that count of distinct for each month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 19:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186563#M14275</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-02-27T19:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186564#M14276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just include the &lt;STRONG&gt;group by&lt;/STRONG&gt; clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; select count(distinct guestnumber) as answer, month&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by month&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 19:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186564#M14276</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2015-02-27T19:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186565#M14277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Please look at fourth line.&amp;nbsp; This is what I want to do.&amp;nbsp; Under the heading 'Count Distinct_of_GuestNumber'n*, I want to show the count of distinct.&amp;nbsp; And I know that code does not work for Proc Tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC TABULATE&lt;/P&gt;&lt;P&gt; DATA=WORK.QUERY_CLUBSERRANO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'COUNT DISTINCT_of_GuestNumber'n*&lt;/P&gt;&lt;P&gt; &lt;EM&gt;&lt;STRONG&gt;count(distinct guestnumber)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GuestNumber*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; N &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CoinIn*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum={LABEL=""}*F=DOLLAR16.2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActualWin*&lt;/P&gt;&lt;P&gt; Sum={LABEL=""}*F=DOLLAR16.2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TheoWin*&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum={LABEL=""}*F=DOLLAR17.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 19:51:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186565#M14277</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-02-27T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186566#M14278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't show any date-related field in your example data. What is the field called and what does it contain?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a date, and your field is called date, you might be able to use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc sql;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select count(distinct guestnumber) as number,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&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; month(date) as month&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by month(date)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 20:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186566#M14278</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-02-27T20:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186567#M14279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, your advice is helpful.&amp;nbsp; The report requires to look like a table using EG tool, Summary Tables. Under the column Count Distinct_of_GuestNumber, it actually has number of counts.&amp;nbsp; I want distinct counts of GuestNumber.&amp;nbsp; Is it possible using Summary Tables?&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="9383" alt="Capture.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/9383_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 21:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186567#M14279</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-02-27T21:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186568#M14280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Run the summary table task twice, the first time save the output to a dataset and the second time use the output from the first run as your input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one generates a unique guest/day record, the second will count the number of unique guests. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 21:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186568#M14280</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-27T21:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct counts in Summary Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186569#M14281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that but could not seem to make it work.&amp;nbsp; How would I exactly do it?&lt;/P&gt;&lt;P&gt;I saved it as a dataset.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/9385_Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Then&amp;nbsp; redo the Summary Tables again.&amp;nbsp; It does not gave a count of distinct GuestNumber.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9386_Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I have Distinct available in Available Statistics in Summary Tables;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9387_Capture.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 22:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Distinct-counts-in-Summary-Table/m-p/186569#M14281</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-02-27T22:03:40Z</dc:date>
    </item>
  </channel>
</rss>

