Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Remove Duplicates in a single cell Power Query

See below's image as an example.  The output should just say Tom Kinney one time.  If there are any duplicate values, separated by the delimiter, they should be removed.

 

Thanks in advanced,

Ryan Mulhollem

 

4 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Anonymous 

     

    Try this custom column from Query Editor.

    Replace ColumnName with actual Name of your Column

     

    =Text.Combine (
                    List.Distinct(
                              List.Transform (Text.Split([ColumnName],","),each Text.Trim(_))
                                      )
                         ,", ")

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Seems like a very simple solution but I cannot figure this out for the life of me :smileysad:

  • Hello, I was able to follow this logic and it worked for me. Thank you so much. I am wondering if it is possible to take it one step further. Instead of simply removing the duplicates - could it display as Tom Kinney x3?