Forum Discussion
chatgpt cannot help me! (return value from another row that has another variable in common)
thanks I understand all the steps, but in the last one, which function should i use to tell to grab the one that doesn´t match the original
this is the original table:
"lemonway_id" "user_id" "type"
123456, 2542,20
123456,9584,21
this is the final outcome that I need:
"lemonway_id" "user_id" "type" "columna"
123456, 2542,20,9584
123456,9584,21,2542
- j_ocean2 years agoHelper V
You would wind up with a duplicate, yes--userid in one column, and that same one again in "all user ids" in the other. I think you mean you want the second column to be "all OTHER userids"?
You can do the merge earlier, before the group-by, and add/filter on a logical column to drop rows with matching userid values. Then do the same group-by with Text.Combine.
Be aware this will duplicate values so if you have a numerical column in there be careful not to sum it in the group-by.