<?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: Select where using several conditions in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50477#M28693</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10528"&gt;@Pacco&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp;There are many ways to do this . One of the ways is to leverage the "extend" functionality. The second argument lets you either "extend" / "restrict" / "clear" current selection . So you can do something like this :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Select Rows( [5, 7, 8, 10, 15] ); // For demo purpose only 
dt &amp;lt;&amp;lt; Label( 1 );
dt &amp;lt;&amp;lt; Clear Select;
Wait( 2 );
dt &amp;lt;&amp;lt; Select Labeled; 
dt &amp;lt;&amp;lt; Select Where(:age &amp;gt; 12,"extend"); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2018 15:00:18 GMT</pubDate>
    <dc:creator>uday_guntupalli</dc:creator>
    <dc:date>2018-01-31T15:00:18Z</dc:date>
    <item>
      <title>Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48720#M27701</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggeling with selecting several rows according to some specific values. I want to select rows where a column cell contains specific values. I manage to select according to two columns with specific values but I cannot add values from the same column that should also be taken into consideration for row selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code that works looks like this:&lt;/P&gt;&lt;P&gt;dt=Current Data Table ();&lt;BR /&gt;dt&amp;lt;&amp;lt; select where (:stationsnamn=="Jungfrun NV" &amp;amp; :profildjup &amp;gt;= 14&amp;nbsp; &amp;amp;:profildjup &amp;lt;= 16);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want to be able to select for example:&lt;/P&gt;&lt;P&gt;dt=Current Data Table ();&lt;BR /&gt;dt&amp;lt;&amp;lt; select where (:stationsnamn=="Jungfrun NV" &amp;amp; :profildjup == 1 &amp;amp;:profildjup==14 &amp;amp;:profildjup == 31);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that .jmp understands the latter as all three numbers have to be present in the same cell. How can I select those rows where in column "profildjup" cells contain 1 Or 14 Or 31 for the specific column stationname?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, how could I add a "select labelled" o this command? Select labelled would refer to additional rows not specified by the information given above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All help is very appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 18:51:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48720#M27701</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2017-12-15T18:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48732#M27703</link>
      <description>&lt;P&gt;The 'or' in JSL is the upper bar, or |.&amp;nbsp;For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$Sample_data/iris.jmp" );
dt &amp;lt;&amp;lt; Select Where( :Sepal length &amp;gt; 6.7 &amp;amp; :Sepal length &amp;lt; 7.2);
dt &amp;lt;&amp;lt; Select Where( :Sepal length == 6.7 | :Sepal length &amp;gt; 7.2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am not sure I follow your question about select labeled, can you give an example of which rows would actually be selected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 19:09:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48732#M27703</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-12-15T19:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48746#M27710</link>
      <description>&lt;P&gt;As can be seen in the Scripting Index:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index&lt;/P&gt;
&lt;P&gt;the Select Where() function allows for specification of "Current Selection("Extend"), which allows the results of a Select Where() to be added to the current selected rows.&lt;/P&gt;
&lt;P&gt;Is this what you are looking for?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 21:57:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/48746#M27710</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-12-15T21:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50420#M28665</link>
      <description>&lt;P&gt;Hey, thank you ih,&lt;/P&gt;&lt;P&gt;The version of Select Where I wanted to find out is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;dt &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt; Select Where&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;Sepal &lt;/SPAN&gt;&lt;SPAN class="token function"&gt;length&lt;/SPAN&gt; = &lt;SPAN class="token number"&gt;6.7&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;Sepal &lt;/SPAN&gt;&lt;SPAN class="token function"&gt;length&lt;/SPAN&gt; = 6&lt;SPAN class="token number"&gt;.8&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&amp;nbsp; /I for this I would need to add a "if any of these conditions apply"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With labelled I refer to the row state. I wanted to include in the "Select Where" several conditions including "labelled" (from row state).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 12:35:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50420#M28665</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2018-01-30T12:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50433#M28674</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10528"&gt;@Pacco&lt;/a&gt;,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Select Rows( [5, 7, 8, 10, 15] );
dt &amp;lt;&amp;lt; Label( 1 );
dt &amp;lt;&amp;lt; Clear Select;
Wait( 2 );
dt &amp;lt;&amp;lt; Select Labeled;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:11:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50433#M28674</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-01-30T15:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50449#M28682</link>
      <description>&lt;P&gt;For your select statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select Where( :Sepal length == 6.7 &amp;amp; :Sepal length == 6.8);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You need to use the OR operator (|), not AND (&amp;amp;):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select Where( :Sepal length == 6.7 | :Sepal length == 6.8);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(edit - need to use == for equals comparison, not =)&lt;/img&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:29:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50449#M28682</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-01-30T16:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50470#M28689</link>
      <description>&lt;P&gt;Thanks for the answer, now I only need to know how to combine it with the "Select Where" function.&lt;/P&gt;&lt;P&gt;Do you know the answer to this, too?&lt;/P&gt;&lt;P&gt;And can you explain me why I only address rows 5,7,8, 10 and 15 for select row?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:45:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50470#M28689</guid>
      <dc:creator>Pacco</dc:creator>
      <dc:date>2018-01-30T20:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select where using several conditions</title>
      <link>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50477#M28693</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10528"&gt;@Pacco&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp;There are many ways to do this . One of the ways is to leverage the "extend" functionality. The second argument lets you either "extend" / "restrict" / "clear" current selection . So you can do something like this :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Select Rows( [5, 7, 8, 10, 15] ); // For demo purpose only 
dt &amp;lt;&amp;lt; Label( 1 );
dt &amp;lt;&amp;lt; Clear Select;
Wait( 2 );
dt &amp;lt;&amp;lt; Select Labeled; 
dt &amp;lt;&amp;lt; Select Where(:age &amp;gt; 12,"extend"); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 15:00:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-where-using-several-conditions/m-p/50477#M28693</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-01-31T15:00:18Z</dc:date>
    </item>
  </channel>
</rss>

