I have tiled my data based on a particular field and sequenced the cases within the tile in ascending order. I want to create a new variable that picks the case with the maximum value (or last occurring) and mark it for further process. See example table below. Suggestions?
| RecID | PID (Tiled) | Visit Seq | New Var. |
| 1 | 1 | 1 | |
| 2 | 1 | 2 | |
| 3 | 1 | 3 | Flag |
| 4 | 2 | 1 | |
| 5 | 2 | 2 | |
| 6 | 2 | 3 | Flag |
| 7 | 3 | 1 | |
| 8 | 3 | 2 | |
| 9 | 3 | 3 | Flag |