Forum Discussion

freelensia's avatar
freelensia
Icon for Advocate II rankAdvocate II
5 years ago
Solved

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?...
  • mahoneypat's avatar
    mahoneypat
    5 years ago

    Add a step prior to this one.  Select both columns and use Replace Values to convert the nulls to blanks.

    Then use this function to remove the blanks from the combined list.

    = Text.Combine(List.Select(List.Distinct(Text.Split([Column1], ",") & Text.Split([Column2], ",")), each _ <> ""), ", ")

     

    Pat