<?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: How to subset / filter data based on frequency of a value within a variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552188#M9131</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268580"&gt;@bretthouston&lt;/a&gt;&amp;nbsp; &amp;nbsp;I think you may be looking to do this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table TEST as
select *
from work.CombiningProceduresDummyVariable
group by CCIdummy
having sum(UpdtxStatus='yes')/n(CCIdummy) ge .05;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 18 Apr 2019 16:54:19 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-04-18T16:54:19Z</dc:date>
    <item>
      <title>How to subset / filter data based on frequency of a value within a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552184#M9128</link>
      <description>&lt;P&gt;I am trying to subset data based on the frequency of a given value within a variable. I've attached a screen shot of a proc freq table, and essentially I would like to include all CCIDummy values where row percent UpdtxStatus 'yes' &amp;gt;/=5%.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following code, but the '%' results in a syntax error:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table TEST as&lt;BR /&gt;select *&lt;BR /&gt;from work.CombiningProceduresDummyVariable&lt;BR /&gt;group by CCIdummy&lt;BR /&gt;having (UpdtxStatus='yes')ge 5%;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552184#M9128</guid>
      <dc:creator>bretthouston</dc:creator>
      <dc:date>2019-04-18T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset / filter data based on frequency of a value within a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552188#M9131</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268580"&gt;@bretthouston&lt;/a&gt;&amp;nbsp; &amp;nbsp;I think you may be looking to do this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table TEST as
select *
from work.CombiningProceduresDummyVariable
group by CCIdummy
having sum(UpdtxStatus='yes')/n(CCIdummy) ge .05;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552188#M9131</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-18T16:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset / filter data based on frequency of a value within a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552189#M9132</link>
      <description>Mean for percentage that's greater than 0.05, or the denominator should be the count of updtxstatus not 100.</description>
      <pubDate>Thu, 18 Apr 2019 16:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552189#M9132</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-18T16:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset / filter data based on frequency of a value within a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552190#M9133</link>
      <description>&lt;P&gt;You are right, I edited 2 secs before yours came through. Good catch!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 16:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552190#M9133</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-18T16:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset / filter data based on frequency of a value within a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552230#M9150</link>
      <description>Thanks this worked perfectly!</description>
      <pubDate>Thu, 18 Apr 2019 18:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-subset-filter-data-based-on-frequency-of-a-value-within-a/m-p/552230#M9150</guid>
      <dc:creator>bretthouston</dc:creator>
      <dc:date>2019-04-18T18:10:48Z</dc:date>
    </item>
  </channel>
</rss>

