Forum Discussion
Yue
8 years agoFrequent Visitor
Remove duplicate texts in one cell
Hi, I am currently shaping my data. I have one column called "Keywords Used in Last Week". However, there are so many duplicate texts in just one cell. How Can I remove the duplicate texts and only s...
- 8 years ago
No, the first step was just for me to create some example data.
You onnly need to add the second step to your query:
Leroynz
8 years agoFrequent Visitor
HI,
I solved it. The key was within the "RemovedDuplicates" row of code: the text.split second parameter after the bracket i changed from" , " to " " as my data had a space as separator not a comma separator. Result all duplicates removed. :smileyhappy:.
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
RemovedDuplicates = Table.TransformColumns(Source,{{"Custom - Copy", each Text.Combine(List.Distinct(List.Transform(Text.Split(_," "), Text.Trim)),", ")}})
in
RemovedDuplicatesGoRo2010
3 years agoNew Member
I was trying this over a few days, and this worked flawless. Thank You