Forum Discussion
freelensia
5 years agoAdvocate II
How to union items from two columns of same table
I have a table with 2 columns that I want to union like this: Column 1 Column 2 Union apple, orange, aple apple, lemon apple, orange, lemon Is there a custom formula I can write?...
- 5 years ago
You can add a custom column with this function. Prior to this step, you can Replace Values and put a space and no value in the 2nd box to get rid of the spaces first if needed.
= Text.Combine(List.Distinct(Text.Split([Column1], ",") & Text.Split([Column2], ",")), ", ")
Pat
mahoneypat
5 years agoMicrosoft Employee
You can add a custom column with this function. Prior to this step, you can Replace Values and put a space and no value in the 2nd box to get rid of the spaces first if needed.
= Text.Combine(List.Distinct(Text.Split([Column1], ",") & Text.Split([Column2], ",")), ", ")
Pat
- freelensia5 years agoAdvocate II
Hi mahoneypat your solution looks simple. Works. I added Text.Lower to ignore upper vs. lowercase differences. I also changed the delimiter to ", "
Btw where is the duplicate of my post?