<?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 Transform Column: Bug with excluded rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676069#M86283</link>
    <description>&lt;P&gt;In the below example, I use a Data Filter to restrict the data - and a Local Data Filter inside the GraphBuilder Script is used to further restrict the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 different Ranks are plotted:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The fist Rank (blue points) doesn't have an Excluded() argument and therefore all data points are counted -&amp;nbsp; even ones which are excluded by the (global) Data Filter. This is why the first plotted entry already starts at a high value.&lt;/LI&gt;&lt;LI&gt;The Second Rank formula (red) has an Excluded() argument, therefore some rows don't count and the Rank values are lower. But still, they don't start at 1. This is expected, because the Formula is stored in the Data Table - and doesn't know about the rows which are excluded by the &lt;STRONG&gt;Local Data Filter&lt;/STRONG&gt; of the Plot.&lt;/LI&gt;&lt;LI&gt;The third Rank formula is the same as the second one, but it is used in a Transform Column which is generated with the report. Unfortunately, also this formula ignores the rows that are excluded by the Local Data Filter.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;not shown:&lt;BR /&gt;the rank as the user expects it: values from 1 to N.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1694255481046.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56428iA02194563A823CA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1694255481046.png" alt="hogi_0-1694255481046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; Data Filter( Add Filter( columns( :height ), Where( :height &amp;gt;= 63 ) ) );


dt &amp;lt;&amp;lt; Graph Builder(
	Transform Column( "Rank[height] 3", Formula( Col Rank( :height, Excluded() ) ) ),
	Variables(
		X(
			:name,
			Order By( :"Rank[height]"n, Ascending, Order Statistic( "Mean" ) )
		),
		Y( :"Rank[height]"n ),
		Y( :"Rank[height] 2"n, Position( 1 ) ),
		Y( :"Rank[height] 3"n, Position( 1 ) )
	),
	Elements( Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 14 ) ) ),
	Local Data Filter( Add Filter( columns( :height ), Where( :height &amp;gt;= 65.815 ) ) ),

)&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 11:03:36 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-10-27T11:03:36Z</dc:date>
    <item>
      <title>Transform Column: Bug with excluded rows</title>
      <link>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676069#M86283</link>
      <description>&lt;P&gt;In the below example, I use a Data Filter to restrict the data - and a Local Data Filter inside the GraphBuilder Script is used to further restrict the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 different Ranks are plotted:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The fist Rank (blue points) doesn't have an Excluded() argument and therefore all data points are counted -&amp;nbsp; even ones which are excluded by the (global) Data Filter. This is why the first plotted entry already starts at a high value.&lt;/LI&gt;&lt;LI&gt;The Second Rank formula (red) has an Excluded() argument, therefore some rows don't count and the Rank values are lower. But still, they don't start at 1. This is expected, because the Formula is stored in the Data Table - and doesn't know about the rows which are excluded by the &lt;STRONG&gt;Local Data Filter&lt;/STRONG&gt; of the Plot.&lt;/LI&gt;&lt;LI&gt;The third Rank formula is the same as the second one, but it is used in a Transform Column which is generated with the report. Unfortunately, also this formula ignores the rows that are excluded by the Local Data Filter.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;not shown:&lt;BR /&gt;the rank as the user expects it: values from 1 to N.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1694255481046.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56428iA02194563A823CA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1694255481046.png" alt="hogi_0-1694255481046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; Data Filter( Add Filter( columns( :height ), Where( :height &amp;gt;= 63 ) ) );


dt &amp;lt;&amp;lt; Graph Builder(
	Transform Column( "Rank[height] 3", Formula( Col Rank( :height, Excluded() ) ) ),
	Variables(
		X(
			:name,
			Order By( :"Rank[height]"n, Ascending, Order Statistic( "Mean" ) )
		),
		Y( :"Rank[height]"n ),
		Y( :"Rank[height] 2"n, Position( 1 ) ),
		Y( :"Rank[height] 3"n, Position( 1 ) )
	),
	Elements( Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 14 ) ) ),
	Local Data Filter( Add Filter( columns( :height ), Where( :height &amp;gt;= 65.815 ) ) ),

)&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 11:03:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676069#M86283</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-10-27T11:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Column: Bug with excluded rows</title>
      <link>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676095#M86284</link>
      <description>&lt;P&gt;As a workaround, one could ask the Data Filter for the &lt;EM&gt;&lt;STRONG&gt;filtered rows&lt;/STRONG&gt;&lt;/EM&gt; and adjust the Formula Column accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works - but definitely not with the comfort one is used to when working with GraphBuilder and JmpDataFilter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A big disadvantage:&lt;/P&gt;&lt;P&gt;In Jmp, users have the freedom to add a Local Data Filter at any time.&lt;/P&gt;&lt;P&gt;Who will add the filter state handler to guarantee that the displayed values are updated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A combination of a Formula Column AND a Data Filter - this doesn't sound like a niche application.&lt;/P&gt;&lt;P&gt;So, besides this workaround, I guess there is an easy solution available in GraphBuilder - but I couldn't find it up to now.&lt;/P&gt;&lt;P&gt;Who had a similar application - and found already the 1-click Jmp comfort solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1694275347238.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56431i9CE6A131207C6864/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1694275347238.png" alt="hogi_1-1694275347238.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

myRows=1::N Rows(dt);

New Column( "Rank_correct",Formula( Col Rank( :height, Excluded(), Contains( myRows, Row() ) &amp;gt; 0 ) ));

gb = dt &amp;lt;&amp;lt; Graph Builder(
Variables(
		X(
			:name,
			Order By( :Rank_correct, Ascending, Order Statistic( "Mean" ) )
		),
		Y( :Rank_correct )
	),Elements( Points( X, Y ) ));
	
updateNow = Function({x},
		myRows= (Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object) &amp;lt;&amp;lt; Get Filtered Rows;
        if(or(isempty(myRows),NItems(myRows)==0),myRows=1::N Rows(dt));
		:Rank_correct&amp;lt;&amp;lt;Eval Formula
);
	
ldf = gb &amp;lt;&amp;lt; Local Data Filter(	Add Filter(	columns( :name ),	Where( :name == {"AMY", "CLAY", "EDWARD"} )	));
	

updateNow(1);
rs = (Current Report()["Local Data Filter"] &amp;lt;&amp;lt; get scriptable object) &amp;lt;&amp;lt; Make Filter Change Handler( updateNow );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 09:01:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676095#M86284</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-10T09:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Transform Column: Bug with excluded rows</title>
      <link>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676802#M86334</link>
      <description>&lt;P&gt;I posted a wish to enhance the functionality of Transform Columns in Graph Builder (and other reports like Summary !!!):&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="Transform Columns - as comfortable as Summary Statistics?" uid="676711" url="https://community.jmp.com/t5/JMP-Wish-List/Transform-Columns-as-comfortable-as-Summary-Statistics/m-p/676711#U676711" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the new functionality Transfrom Columns will get as comfortable as Summary Statistics - and the functionality will go far beyond that :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:31:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Transform-Column-Bug-with-excluded-rows/m-p/676802#M86334</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-12T11:31:22Z</dc:date>
    </item>
  </channel>
</rss>

