May I ask whether these two steps can be completed by a formula?1. In the original ranking situation, we first found out that the weight was the largest position among the three people before and after the belief (7 people were compared each time).
2. Then find the number of lines between the equals sign of each line and the maximum weight.
(when he has a maximum weight, his subsequent lines are compared with the new maximum weight.)
This table data in dt = Open("$SAMPLE_DATA/Big class.jmp ");I can only add 2 columns to the file to complete it.
Re: May I ask whether these two steps can be completed by a formula?It seems to work.I want a better way,Thanks!
Re: May I ask whether these two steps can be completed by a formula?Here is an option to do this in one column, note the new column name is 'IntervalNew':

Script to create the column for you using the big class data table:
Spoilernames default to here(1);
dt = open("$SAMPLE_DATA/big class.jmp");
dt << New Column( "IntervalNew",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
If(
Row() == 1, 1,
:weight == Max( :weight[Index( Row() - 3, Row() + 3 )] ), 0,
Lag( :IntervalNew ) + 1
)
)
);