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.
3 different Ranks are plotted:
- The fist Rank (blue points) doesn't have an Excluded() argument and therefore all data points are counted - even ones which are excluded by the (global) Data Filter. This is why the first plotted entry already starts at a high value.
- 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 Local Data Filter of the Plot.
- 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.
not shown:
the rank as the user expects it: values from 1 to N.

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Data Filter( Add Filter( columns( :height ), Where( :height >= 63 ) ) );
dt << 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 >= 65.815 ) ) ),
)