<?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: Filtering Rows by List in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847403#M102217</link>
    <description>&lt;P&gt;For additional clarification, the final table I am hoping to look like&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Fruit&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Color&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Tue, 11 Mar 2025 18:42:18 GMT</pubDate>
    <dc:creator>asiegel</dc:creator>
    <dc:date>2025-03-11T18:42:18Z</dc:date>
    <item>
      <title>Filtering Rows by List</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847393#M102216</link>
      <description>&lt;P&gt;JMP 18&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to subset a table based on values selected from combo boxes. I have two sets of combo boxes that interplay, which I have called cb1 and cb2, for the parent combo boxes, and subCB1 and subCB2, for "Sub" combo boxes. The parent combo boxes cb1 and cb2 make up the columns of a data table, dt_SUM, and the data under each column then populates the options it's corresponding sub combo box, subCB1 or subCB2 respectively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The combo box selections and the dt_SUM data table would look something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cb1: Fruit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subCB1: Apple&lt;/P&gt;&lt;P&gt;cb2: Colors&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;subCB2: Red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt_SUM&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Fruit&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Colors&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count (N)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;Green&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tomato&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tomato&lt;/TD&gt;&lt;TD&gt;Green&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;8&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to subset the dt_SUM table based on the selections of the combo boxes and subcombo boxes. For instance, I want the new table, dt_COUNT to display only the row that corresponds to Apple and Red. I have attempted to do so a few ways, but primarily through trying to propagate a list that contains the expression for filtering the cb1 column by the subCB1 selection.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;selectedConditions = List();

If(cb1 != "Select Parameter", Insert Into( selectedConditions, Expr(Column(dt_SUM, cb1) == subCB1 ) ) );

If(cb2 != "Select Parameter", Insert Into( selectedConditions, Expr(Column(dt_SUM, cb2) == subCB2 ) ) );

SOPmean;

SOPMean = Expr(
	dt_MEAN = dt_SUM &amp;lt;&amp;lt; Subset(
		Filtered rows( selectedConditions ),
		Selected columns only( 0 ),
		columns( :Count ),
		output table name ( "count")
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The cb1 != "Select Parameter" covers that there are up to 5 combo boxes and default set to "Select Parameter" so if unchanged do not want them involved.&lt;BR /&gt;I've tried various versions of adding Char( and &amp;lt;&amp;lt; Get selected within the expression but havent yet been able to print {:Fruit == "Apple", :Color == "Red"} successfully. Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 18:39:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847393#M102216</guid>
      <dc:creator>asiegel</dc:creator>
      <dc:date>2025-03-11T18:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Rows by List</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847403#M102217</link>
      <description>&lt;P&gt;For additional clarification, the final table I am hoping to look like&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Fruit&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Color&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 11 Mar 2025 18:42:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847403#M102217</guid>
      <dc:creator>asiegel</dc:creator>
      <dc:date>2025-03-11T18:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Rows by List</title>
      <link>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847452#M102225</link>
      <description>&lt;P&gt;Can you provide the script you have written up to this point?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 06:40:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filtering-Rows-by-List/m-p/847452#M102225</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-12T06:40:26Z</dc:date>
    </item>
  </channel>
</rss>

