Here is one way to solve your issue.
![txnelson_0-1627441274078.png txnelson_0-1627441274078.png](https://community.jmp.com/t5/image/serverpage/image-id/34598i92D35F8E84772201/image-size/medium?v=v2&px=400)
Here is the formula I used
If( Row() == 1 | Lag( :ITEM ) != :ITEM,
currentItem = :ITEM;
theRows = Current Data Table() << get rows where( :ITEM == currentItem );
For( i = 1, i <= N Rows( theRows ), i++,
theRows[i] = :ID[theRows[i]]
);
r = Rank( theRows );
theValues = theRows[r];
Remove From( theValues, 7, 9999999 );
);
If( N Rows( Loc( theValues, :ID ) ) > 0,
"Y",
""
);
I have attached the sample data table shown above
Jim