<?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: desperately needed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266432#M52516</link>
    <description>I do not mean about frequency, i mean, counting total number of secid per year that has permno.</description>
    <pubDate>Tue, 26 Apr 2016 15:57:12 GMT</pubDate>
    <dc:creator>Daniel1027</dc:creator>
    <dc:date>2016-04-26T15:57:12Z</dc:date>
    <item>
      <title>Count Distinct By groups with filter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266424#M52511</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to count security ID (secid) per year that has permno. &amp;nbsp;I urgently needed to count them. please help me guys.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my sample dataset shown as:&lt;/P&gt;
&lt;P&gt;secid &amp;nbsp; effect_date &amp;nbsp; &amp;nbsp; &amp;nbsp;cusip &amp;nbsp; &amp;nbsp; &amp;nbsp;ticker &amp;nbsp;issuer &amp;nbsp;permno&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;6405 &amp;nbsp; &amp;nbsp; 1/1/1996 &amp;nbsp; &amp;nbsp; 86590610 &amp;nbsp;sugr&amp;nbsp; calcomp &amp;nbsp; &amp;nbsp;11727&lt;/P&gt;
&lt;P&gt;6405 &amp;nbsp; &amp;nbsp; &amp;nbsp;7/24/1996 12870110 &amp;nbsp; clcp &amp;nbsp; calcomp &amp;nbsp; &amp;nbsp; 11727&lt;/P&gt;
&lt;P&gt;6406 &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1/1996 &amp;nbsp; 16939610 &amp;nbsp; cinc &amp;nbsp; china.inc &amp;nbsp; &amp;nbsp;&amp;nbsp;11729&lt;/P&gt;
&lt;P&gt;6410 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/1/1996 &amp;nbsp;&amp;nbsp; 55267210 &amp;nbsp;? &amp;nbsp; &amp;nbsp; &amp;nbsp; mcgec.inc &amp;nbsp; &amp;nbsp;(none)&lt;/P&gt;
&lt;P&gt;6409 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2/11/2000 &amp;nbsp;&amp;nbsp;72017210 &amp;nbsp;peide &amp;nbsp;piedmont &amp;nbsp;&amp;nbsp; 75561&lt;/P&gt;
&lt;P&gt;6420 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 3/7/1997 &amp;nbsp;&amp;nbsp; 89620810 &amp;nbsp;? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trimac &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (none)&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 16:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266424#M52511</guid>
      <dc:creator>Daniel1027</dc:creator>
      <dc:date>2016-04-26T16:31:52Z</dc:date>
    </item>
    <item>
      <title>desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266425#M52512</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to count security ID (secid) per year that has permno. &amp;nbsp;I urgently needed to count them. please help me guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my sample dataset shown as:&lt;/P&gt;&lt;P&gt;secid &amp;nbsp; effect_date &amp;nbsp; &amp;nbsp; &amp;nbsp;cusip &amp;nbsp; &amp;nbsp; &amp;nbsp;ticker &amp;nbsp;issuer &amp;nbsp;permno&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6405 &amp;nbsp; &amp;nbsp; 1/1/1996 &amp;nbsp; &amp;nbsp; 86590610 &amp;nbsp;sugr&amp;nbsp; calcomp &amp;nbsp; &amp;nbsp;11727&lt;/P&gt;&lt;P&gt;6405 &amp;nbsp; &amp;nbsp; &amp;nbsp;7/24/1996 12870110 &amp;nbsp; clcp &amp;nbsp; calcomp &amp;nbsp; &amp;nbsp; 11727&lt;/P&gt;&lt;P&gt;6406 &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1/1996 &amp;nbsp; 16939610 &amp;nbsp; cinc &amp;nbsp; china.inc &amp;nbsp; &amp;nbsp;&amp;nbsp;11729&lt;/P&gt;&lt;P&gt;6410 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/1/1996 &amp;nbsp;&amp;nbsp; 55267210 &amp;nbsp;? &amp;nbsp; &amp;nbsp; &amp;nbsp; mcgec.inc &amp;nbsp; &amp;nbsp;(none)&lt;/P&gt;&lt;P&gt;6409 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2/11/2000 &amp;nbsp;&amp;nbsp;72017210 &amp;nbsp;peide &amp;nbsp;piedmont &amp;nbsp;&amp;nbsp; 75561&lt;/P&gt;&lt;P&gt;6420 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 3/7/1997 &amp;nbsp;&amp;nbsp; 89620810 &amp;nbsp;? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trimac &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (none)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 15:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266425#M52512</guid>
      <dc:creator>Daniel1027</dc:creator>
      <dc:date>2016-04-26T15:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266427#M52513</link>
      <description>I am doing my undergraduate interdisciplinary project individually. I thought, i need to work with sas software, because it will be my advantage in the future. basically, this is for my project.</description>
      <pubDate>Tue, 26 Apr 2016 15:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266427#M52513</guid>
      <dc:creator>Daniel1027</dc:creator>
      <dc:date>2016-04-26T15:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266428#M52514</link>
      <description>&lt;P&gt;Does your PermNo variable actually contain text "(none)" or is it a SAS MISSING value? If the later&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc freq data = have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; where not missing(permno);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables secid;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;will give the count of each secid and the cumulative at the end of the table the overal count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the value of PermNo actually contains text of (none)&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;Proc freq data = have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; where permno ne '(none)';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables secid;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;will do the same thing.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 15:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266428#M52514</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-26T15:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266430#M52515</link>
      <description>sorry for inconvenience. I wrote down "none" in some case, there is just "."(dot).</description>
      <pubDate>Tue, 26 Apr 2016 15:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266430#M52515</guid>
      <dc:creator>Daniel1027</dc:creator>
      <dc:date>2016-04-26T15:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266432#M52516</link>
      <description>I do not mean about frequency, i mean, counting total number of secid per year that has permno.</description>
      <pubDate>Tue, 26 Apr 2016 15:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266432#M52516</guid>
      <dc:creator>Daniel1027</dc:creator>
      <dc:date>2016-04-26T15:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: desperately needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266435#M52519</link>
      <description>&lt;P&gt;proc sql;&lt;BR /&gt;select distinct year(effect_date) as year, count(distinct secid) as secid from have&lt;BR /&gt;where permno ne .&lt;BR /&gt;group by year(effect_date);&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2016 16:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-Distinct-By-groups-with-filter/m-p/266435#M52519</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2016-04-26T16:03:43Z</dc:date>
    </item>
  </channel>
</rss>

