<?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: Add a local data filter to a subset table command using code in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-a-local-data-filter-to-a-subset-table-command-using-code/m-p/632260#M83069</link>
    <description>&lt;P&gt;If you compute a subset table in JMP 17 with the Filtered Rows option:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="danschikore_0-1684244891459.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52821i7DC3B14E9DC8987B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danschikore_0-1684244891459.png" alt="danschikore_0-1684244891459.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Log will show you what the script should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Subset data table
// → Data Table( "Subset of Big Class 2" )
Data Table( "Big Class" ) &amp;lt;&amp;lt; Subset(
	Filtered Rows( :height &amp;gt;= 61 &amp;amp; :weight &amp;lt;= 98 ),
	Selected columns only( 0 )
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the data filter that is included in the interface is only for UI - the JSL only requires the where-clause that the filter generates.&amp;nbsp; In earlier versions of JMP one way to do something similar would be to select the rows before computing the subset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "Big Class" ) &amp;lt;&amp;lt; Select Where(:height &amp;gt;= 61 &amp;amp; :weight &amp;lt;= 98);
Data Table( "Big Class" ) &amp;lt;&amp;lt; Subset(
	Selected Rows( 1 ),
	Selected columns only( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 13:53:49 GMT</pubDate>
    <dc:creator>danschikore</dc:creator>
    <dc:date>2023-05-16T13:53:49Z</dc:date>
    <item>
      <title>Add a local data filter to a subset table command using code</title>
      <link>https://community.jmp.com/t5/Discussions/Add-a-local-data-filter-to-a-subset-table-command-using-code/m-p/632248#M83068</link>
      <description>&lt;P&gt;This is the code I wrote to create a subset table with a local data filter. I get a table with the columns selected but with all rows i.e., the local filter is not working.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table("JoinedData140523") &amp;lt;&amp;lt; Subset(
	Selected columns only(0),
	columns(
		:age 2022, :"# of children"n, :Gender, :Nationality, :Religiosity,
		:Education 3, :TOP YN, :TOP NoRelig YN
	),
	Local Data Filter(
		Add Filter(
			columns(:"Sevirity&amp;gt;3"n, :TOP total),
			Where(:"Sevirity&amp;gt;3"n == "1" &amp;amp; :TOP total == "Yes") // Combine the filter conditions
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:10:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-a-local-data-filter-to-a-subset-table-command-using-code/m-p/632248#M83068</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2023-06-09T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add a local data filter to a subset table command using code</title>
      <link>https://community.jmp.com/t5/Discussions/Add-a-local-data-filter-to-a-subset-table-command-using-code/m-p/632260#M83069</link>
      <description>&lt;P&gt;If you compute a subset table in JMP 17 with the Filtered Rows option:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="danschikore_0-1684244891459.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52821i7DC3B14E9DC8987B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danschikore_0-1684244891459.png" alt="danschikore_0-1684244891459.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Log will show you what the script should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Subset data table
// → Data Table( "Subset of Big Class 2" )
Data Table( "Big Class" ) &amp;lt;&amp;lt; Subset(
	Filtered Rows( :height &amp;gt;= 61 &amp;amp; :weight &amp;lt;= 98 ),
	Selected columns only( 0 )
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the data filter that is included in the interface is only for UI - the JSL only requires the where-clause that the filter generates.&amp;nbsp; In earlier versions of JMP one way to do something similar would be to select the rows before computing the subset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "Big Class" ) &amp;lt;&amp;lt; Select Where(:height &amp;gt;= 61 &amp;amp; :weight &amp;lt;= 98);
Data Table( "Big Class" ) &amp;lt;&amp;lt; Subset(
	Selected Rows( 1 ),
	Selected columns only( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 13:53:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-a-local-data-filter-to-a-subset-table-command-using-code/m-p/632260#M83069</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2023-05-16T13:53:49Z</dc:date>
    </item>
  </channel>
</rss>

