For the latest version of JMP Help, visit JMP.com/help.

dt << Data Filter( <local>, <invisible>, <Add Filter (...)>, <Mode>, <Show Window( 0 | 1 ), <No Outline Box( 0 | 1 )> );
You can send an empty Data Filter message to a data table, and the initial Data Filter window appears, showing the Add Filter Columns panel that lists all the variables in the data table.
Mode takes three arguments, all of which are optional: Select(bool), Show(bool), Include(bool). These arguments turn on or off the corresponding options. The default value for Select is true (1). The default value for Show and Include is false (0).
Add Filter() adds rows and builds the WHERE clauses that describe a subset of the data table. The basic syntax appears as follows:
Add Filter( Columns( col, ... ), Where( ... ), ... )
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
df = dt << Data Filter(
	Mode( Show( 1 ) ),
	Add Filter(
		Columns( :age, :sex, :height ),
		Where( :age == {13, 14, 15} ),
		Where( :sex == "M" ),
		Where( :height >= 52 & :height <= 65 )
	)
);
df << ( Filter Column( :age ) << Invert Selection );
You can also use Add Filter() to select matching strings from columns with the Multiple Response property or Multiple Response modeling type.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
df = dt << Data Filter(
	Location( {437, 194} ),
	Add Filter(
		Columns( :Brush Delimited ),
		Match None( Where( :Brush Delimited == {"Before Sleep", "Wake"} ) ),
		Display( :Brush Delimited, Size( 121, 70 ), Check Box Display )
		// defines the display options. "Brush Delimited" appears above
		// the list of values. Size is the size of the filter list. The
		// values appear next to check boxes.
	)
);
This script selects rows with values in the Brush Delimited column that do not match either of the specified values ("Before Sleep", "Wake"). Other available scripting options include Match Any, Match All, Match Exactly, and Match Only. See Multiple Response in the Using JMP book for details about the Multiple Response property and the Multiple Response modeling type.
Clear(), Display( ... ), Animate(), Mode(), ...
Clear takes no arguments and clears the data filter.
obj  = ( dt << Data Filter( Show Window( 0 ) ) );
To specify which values to exclude, use the != operator. The following example excludes ages 16 and 17 from the filtered values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
df = dt << Data Filter(
	Add Filter( Columns( :age, :sex ) ),
	Match( Columns( :age, :sex ),
		Where( :sex = "M" ), Where( :age != {16, 17} )
	)
);
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt << Data Filter(
	Add Filter( Columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ),
	Mode( Select( 0 ), Show( 0 ), Include( 1 ) ),
	No Outline Box( 1 )
);
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
biv = dt << Bivariate(
	Y( :x ),
	X( :y ),
	Automatic Recalc( 1 ),
	Fit Line( {Line Color( {213, 72, 87} )} )
 
);
 
dfObj = biv << Local Data Filter(
	Location( {566, 47} ),
	Mode( Select( 0 ), Include( 1 ) )
);
 
dfObj << Add Filter(
	Columns( :Region, :POP ),
	Where( :Region == {"C", "N"} )
);
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dist = Distribution(
	Automatic Recalc( 1 ),
	Continuous Distribution( Column( :POP ) )
);
filter = dist << Local Data Filter(Add Filter( columns( :Region ) ));
f = Function( {a}, Print( a ) );
rs = filter << Make Filter Change Handler( f );
Another option is to filter data from specific platforms or display boxes. Create a local data filter inside the Data Filter Context Box() function. This defines the context as the current platform or display box rather than the data table.
New Window( "Marker Seg Example",
	Data Filter Context Box(
		V List Box(
			dt << Data Filter( Local ),
			g = Graph Box(
				Frame Size( 300, 240 ),
				X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
				Y Scale( Min( yy ) - 5, Max( yy ) + 5 ),
				Marker Seg( xx, yy, Row States( dt, rows ) )
			)
		)
	)
);
Figure 9.4 Local Data Filter and Graph
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Shared Local Filter",
	Data Filter Context Box(
		H List Box(
			dt << Data Filter( Local ),
			Platform(
				dt,
				Bubble Plot( X( :weight ), Y( :height ), Sizes( :age ) )
			),
			Platform(
				dt,
				Bubble Plot( X( :weight ), Y( :age ), Sizes( :height ) )
			)
		)
	)
);
Tip: To experiment with this script, open the Local Data Filter Shared.jsl sample script.
Figure 9.5 Local Filter with Two Bubble Plots
Tip: The following script is part of a larger script that first builds the arrays required for a marker seg. See the Local Data Filter for Custom Graph.jsl sample script for code that builds those arrays.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
...
New Window( "Marker Seg Example",
	Data Filter Context Box(
		V List Box(
			dt << Data Filter( Local ),
			g = Graph Box(
				Frame Size( 300, 240 ),
				X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
				Y Scale( Min( yy ) - 5, Max( yy ) + 5 ),
				Marker Seg( xx, yy, Row States( dt, rows ) )
			)
		)
	)
);
Figure 9.6 Data Filter Hierarchy

Help created on 3/19/2020