Here is the formula that I came up with
If( Row() > 6,
Mode( Matrix( :height[Index( Row() - 5, Row() )] ) || Matrix( :weight[Index( Row() - 5, Row() )] ) ),
Mode( Matrix( :height[Index( 1, Row() )] ) || Matrix( :weight[Index( 1, Row() )] ) )
)
Note: The Range() function returns the minimum and maximum values found in the list or matrix
Note: JMP returns the minimum mode value if there is more than one mode
mode([77,55,33,77,55])
returns
55
while
mode([55,34,67,88,65])
returns
34
Jim