Mar 3, 2015
Refer to "Formula/Outcome" column which is my desired outcome. What formula can I use to create a sequence of numbers that restarts at each change in "composite key". In this example the "composite key" is ID and Category.
Jun 23, 2011
This type formula should work if the table is sorted:
If( Row() > 1,
If( :ID == Lag( :ID, 1 ) & :Category == Lag( :Category, 1 ),
Lag( :Outcome, 1 ) + 1,
The below should also work (but independent of sorting).
Eval( Eval Expr( Col Number( Row(), Row() > Expr( Row() ), :ID, :Category ) ) )