I use Col Rank() to count runs:
Col Rank( :DateTime, :WaferID, <<Tie( "minimum" ) )
Each run may have multiple rows, which I can only separate by DateTime, so instead of writing long if statements, I used this formula.
The only thing that I don't like is the following. Let's say I have three rows generated per run, then my RunID column would look like:
and so on. I get where it comes from.
My question is - what would be the cleanest way to convert that to effectively 1, 1, 1, 2, 2, 2, 3, 3, 3?