<?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: Specific filtering of data in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697054#M25336</link>
    <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 05:44:51 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-06T05:44:51Z</dc:date>
    <item>
      <title>Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696986#M25325</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a data set with bridge name, Condition, inspection and year&lt;/P&gt;
&lt;P&gt;The condition of the bridge can have different number (4,5,6,7,8) for the same bridge and the bridge name is repeated in my data set, not all the bridges are repeated though.&lt;/P&gt;
&lt;P&gt;I want to filter bridge that has at least 2 different conditions (I don't want to specify the condition Number neither the bridge name.) How could I proceed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example bridge P505 below has 3 condition (that is the type I want to keep) and bridge P416 only have 1 condition (I don't want to keep that). I have about 900 rows&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blandine_0-1604611030188.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51429i8362AC759A2F3958/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Blandine_0-1604611030188.png" alt="Blandine_0-1604611030188.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 21:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696986#M25325</guid>
      <dc:creator>Blandine</dc:creator>
      <dc:date>2020-11-05T21:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696988#M25327</link>
      <description>&lt;P&gt;Please post your data in a form that allows us to use it for testing.&lt;/P&gt;
&lt;P&gt;Use a data step with datalines, and use a code box for posting.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 21:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696988#M25327</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-05T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696999#M25328</link>
      <description>&lt;P&gt;It is not nice to discuss a requirement like "bridge" without explicitly tieing it to the variable name.&lt;/P&gt;
&lt;P&gt;You don't indicate any need to consider the other variables&lt;/P&gt;
&lt;P&gt;Something like this might work. You did not supply an example of what you actually expect the result to be.&lt;/P&gt;
&lt;P&gt;"Filter" can have many meanings. This gets you a list of the "bridges" that could be used to select records with a join or data step merge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table multipleconditions as
   select stucture_number_008, count(superstructure_cond_59) as condcount
   from (select distinct stucture_number_008, superstructure_cond_59
         from yourdatasetnamegoeshere)
   group by stucture_number_008
   having   count(superstructure_cond_59)&amp;gt;1
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 21:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/696999#M25328</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-05T21:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697013#M25329</link>
      <description>&lt;P&gt;sorry but I am not sure I understand what you mean by "&lt;SPAN&gt;use a code box"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 22:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697013#M25329</guid>
      <dc:creator>Blandine</dc:creator>
      <dc:date>2020-11-05T22:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697014#M25330</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *
from have
group by bridge&amp;lt;replace with correct variable names&amp;gt;
having count(distinct condition)&amp;gt;=2;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Replace the variable with your variable names and you can use the HAVING clause to filter your data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350498"&gt;@Blandine&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a data set with bridge name, Condition, inspection and year&lt;/P&gt;
&lt;P&gt;The condition of the bridge can have different number (4,5,6,7,8) for the same bridge and the bridge name is repeated in my data set, not all the bridges are repeated though.&lt;/P&gt;
&lt;P&gt;I want to filter bridge that has at least 2 different conditions (I don't want to specify the condition Number neither the bridge name.) How could I proceed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example bridge P505 below has 3 condition (that is the type I want to keep) and bridge P416 only have 1 condition (I don't want to keep that). I have about 900 rows&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blandine_0-1604611030188.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51429i8362AC759A2F3958/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Blandine_0-1604611030188.png" alt="Blandine_0-1604611030188.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 22:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697014#M25330</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-05T22:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Specific filtering of data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697054#M25336</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 05:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specific-filtering-of-data/m-p/697054#M25336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-06T05:44:51Z</dc:date>
    </item>
  </channel>
</rss>

