Forum Discussion
oscarcu90
2 years agoNew Member
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?
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
- ryan_mayuSuper User
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]) - oscarcu90New Member
Simple but worked as a charm, thanks!
- ryan_mayuSuper User
you are welcome