You could combine Col Cumulative Sum with Col Min
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(12),
Compress File When Saved(1),
New Column("Column 1", Character, "Nominal", Set Values({"A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B"})),
New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1])),
New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 2, 3, 1, 1, 1, 1, 2, 2, 3, 3]))
);
dt << New Column("R", Numeric, Continuous, Formula(
Col Cumulative Sum(Row() == Col Min(Row(), :Column 1, :Column 2, :Column 3), :Column 1, :Column 2)
));
-Jarmo