This is long-since solved, but I found a solution to this yesterday that I figured I'd share in case it's helpful to anyone. Create a new formula column with this formula:
Col Maximum(
Col Rank(
If( Row() == Col Minimum( Row(), :Label ),
:Label,
.
)
),
:Label
)
Basically this first creates a new array with the label in the row corresponding to its first instance in the original column, and "." everywhere else. Then we ask for the ranking of each label, which results in another array with the label ranking instead of the label itself, and then finally we output an array with the ranking in all rows with that label, and that's what ends up in the formula column.
In my case I was trying to rank groups of sets of data based on their highest value in another column -- e.g. with columns Group, Set, Time, Value, I wanted to find the set's rank within the group based on the highest Value observed across time. Here's a formula that worked:
Col Maximum(
Col Rank(
If ( Row() == Col Minimum( Row(), :Group, :Set),
Col Maximum( :Value, :Group, :Set ),
.
),
:Group,
<<tie("row")
),
:Group, :Set
)
I don't know if this is the best way, but it works, and ChatGPT couldn't offer a solution at all, so maybe this will help someone.