Here is a formula you can use. Create the new column Run #. I suggest you make the modeling type "Ordinal". Open the Formula Editor for the new column, and paste in the following.
If( Row() == 1,
:Process ID << set property( "Value Order", {Common Order( 0 ), Row Order Levels( 1 )} );
Summarize( byGroup = by( :Process ID ) );
:Process ID << delete property("Value Order");
);
Below is a script that will do the column creation and apply the formula for you
Names Default To Here( 1 );
dt = Current Data Table();
dt << New Column( "Run #",
ordinal,
formula(
If( Row() == 1,
:Process ID << set property( "Value Order", {Common Order( 0 ), Row Order Levels( 1 )} );
Summarize( byGroup = by( :Process ID ) );
:Process ID << delete property("Value Order")
);
Contains( byGroup, :Process ID );
)
);
Jim