One way would be to create formula using Lag and then you can get max value of that column
If(
Row() == 1,
counter = 1;
, Lag(:col, 1) != :col,
counter++
);
counter;
![jthi_0-1647639220121.png jthi_0-1647639220121.png](https://community.jmp.com/t5/image/serverpage/image-id/40960i3683E856360E0C73/image-size/medium?v=v2&px=400)
Maybe something like this could also work:
Col Cumulative Sum(Lag(:col) != :col)
-Jarmo