cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

Data Filter: exclude excluded rows

Is there an option (checkbox or setting) in Jmp to tell a data filter to exclude excluded rows from the lists?

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt << Data Filter(
	Location( {265, 175} ),
	Mode( Select( 0 ), Include( 1 ) ),
	Add Filter(
		columns( :age, :sex ),
		Where( :age == {12, 14, 16} ),
		Where( :sex == "F" ),
		Display( :age, N Items( 6 ) )
	)
);

dt << New Column( "excluded", Character, "Nominal", set each value( If( Excluded(), "(excluded)", "" ) ) );
dt << New Column( "age_", Character, "Nominal", set each value( Char( :age ) || " " || :excluded ) );
dt << New Column( "sex_", Character, "Nominal", set each value( :sex || " " || :excluded ) );
	
gb = dt << Graph Builder(
	Size( 534, 498 ),
	Show Control Panel( 0 ),
	Summary Statistic( "Median" ),
	Graph Spacing( 4 ),
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);

df = gb << Local Data Filter(
	Conditional,
	Add Filter(
		columns( :excluded, :age_, :sex_ ),
		Where( Is Missing( :excluded ) )
	)
);
wait(4);

gb << Remove Local Data Filter();

df = gb << Local Data Filter(
	Add Filter(
		columns( :age_, :sex_ )
	)
);

	

	

 

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Data Filter: exclude excluded rows

Do you not want those levels or values to show up in a local data filter?  If so I think you are looking for 'Count Excluded Rows' from the red triangle context menu of the local data filter.

 

ih_0-1671656630513.png

 

View solution in original post

8 REPLIES 8
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Data Filter: exclude excluded rows

Do you not want those levels or values to show up in a local data filter?  If so I think you are looking for 'Count Excluded Rows' from the red triangle context menu of the local data filter.

 

ih_0-1671656630513.png

 

hogi
Level XII

Re: Data Filter: exclude excluded rows

@ih wrote:

Do you not want those levels or values to show up in a local data filter? 


 

Sorry for the misunderstanding -  exclude excluded rows from the lists:

remove excluded rows from the lists that are displayed in the data filter.

 

the idea:

It will not make a difference if I select one of the excluded items or not.

The points won't show up in the plot - why should the items show up in the data filter.

 

Actually: the same thing that I did via JSL - but just with a hidden checkbox or command for the Data filter.
Why does a data filter *) which could look like this:

hogi_2-1671722750339.png

actually look like this (excluded, unnecessary items highlighted red):

hogi_0-1671723306005.png


*) Following the example from the code in the original post.
Oops: after generating these images I noticed that the filter for sex doesn't make sense - but anyway, I hope the idea gets clear.

Re: Data Filter: exclude excluded rows

The global Data Filter affects the row states in the data table. The Local Data Filter affects the data used in the platform. These filters are independent. Actions using the Local Data Filter do not affect the row states and vice versa. That behavior is intentional. You script new behavior if necessary.

hogi
Level XII

Re: Data Filter: exclude excluded rows

Hm, still a bit confusing:

  • Graph Builder respects the pre-selection by the Global Data Filter 
    an there is a hidden feature to disable this feature (hogi_1-1671731404998.png)
  • The Data Filter of the Graph Builder doesn't take it into account by default
    - and there is not even a one-click-option to take the pre-selection into account.

I assume that the majority of the Jmp users don't have  hogi_1-1671731404998.pngenabled on their system by default.

Therefore it is still unclear to me why the local data filter provides at all entries in the lists which cannot be used to activate/deactivate any data points in the plot.

 

This is why I submitted this wish:
local data filters: option to exclude excluded items 

i hope other users will support this idea

Re: Data Filter: exclude excluded rows

Hi @hogi - I have followed up on the wish post, also suggesting that you try the Count Excluded Rows(0) option as @ih mentioned.

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Data Filter: exclude excluded rows

Hi @hogi, as @danschikore suggests could you try enabling the Count Excluded Rows option shown in the screenshot of the first reply to this thread?  I suspect your wish list item could be fulfilled by enabling that option by default.

hogi
Level XII

Re: Data Filter: exclude excluded rows

Thanks to all!

Now I got the point - finally.

 

Count Excluded Rows (0|1)

... much more than just a setting to define if excluded rows are counted or not

 


@ih wrote:

....  by enabling that option by default.


would be great - is this possible?

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Data Filter: exclude excluded rows

I couldn't find a way to set that via preferences and then I see that @danschikore came to the same conclusion in the wish list post.  I suggest just editing your your wish list post/item to indicate that JMP could just add a preference for that default behavior.