Forum Discussion

oscarcu90's avatar
oscarcu90
New Member
2 years ago
Solved

Merge columns but avoid duplicating values

Hi, I do not know if this is possible. I want to merge 2 columns but avoiding to merge values if the data is duplicated. How can I proceed?

 

 

  • oscarcu90 

    you can try to add a custom column in PQ

     

    =if [Suppplier1]=[Supplier2] then [Suppplier1] else [Suppplier1]&[Supplier2]

     

    or use DAX:

     

    Column = if('Table'[Supplier2]='Table'[Supplier1],'Table'[Supplier1],'Table'[Supplier1]&'Table'[Supplier2])
     

     

     

     

3 Replies

  • oscarcu90 

    you can try to add a custom column in PQ

     

    =if [Suppplier1]=[Supplier2] then [Suppplier1] else [Suppplier1]&[Supplier2]

     

    or use DAX:

     

    Column = if('Table'[Supplier2]='Table'[Supplier1],'Table'[Supplier1],'Table'[Supplier1]&'Table'[Supplier2])