I'm trying to create a unique id based on values in 2 columns: partner and label. In our data, we have names associated with partners, but when we share data we don't want to share names, so instead I'd like to create IDs. As you can see in the sample below, we use two columns because names can be repeated between partners.
The "group_id" column is what I'd like the end result to be, but can't get there! I've tried making a helper column "distinct" with a combination of COUNT(COLLECT(DISTINCT.. values of test_id and then using that number to append to the partner.
partner = text we enter
label = text we enter
test_id (formula)= partner@row + "_" + label@row
group_id = your solution :)
For those that may be R savvy, what I would do there is:
group_by(partner, label) %>% mutate(group_id = cur_group_id()