Forum Discussion
Remove duplicate names in a same column
- 1 year ago
dufoq3 thanks for your response , i have fixed this issue by using below query in editor :
#"Cleaned InvoiceCreatedBy" = Table.TransformColumns(#"Added Custom4", {
"InvoiceCreatedBy", each
let
textValue = Text.Combine(List.Transform(_, Text.From), ","),
nameList = List.Transform(Text.Split(textValue, ","), Text.Trim),
uniqueNames = List.Distinct(nameList)
in
Text.Combine(uniqueNames, ", "),
type text
})
in
#"Cleaned InvoiceCreatedBy"
Hi DineshArivu,
before
after
let
Source = Expression.Evaluate("Table.FromRows(List.Transform(Text.Split(""Aug-11-2025,Aug-01-2025;Person A,Person B|Aug-15-2025,Aug-09-2025;Person C,Person C"",""|""), each Text.Split(_, "";"")), {""Invoice Create Date"",""Invoice Created By""})", #shared),
DistinctCreatedBy = Table.TransformColumns(Source, {"Invoice Created By", each Text.Combine(List.Distinct(Text.Split(_, ",")), ",")})
in
DistinctCreatedBydufoq3 thanks for your response , i have fixed this issue by using below query in editor :
#"Cleaned InvoiceCreatedBy" = Table.TransformColumns(#"Added Custom4", {
"InvoiceCreatedBy", each
let
textValue = Text.Combine(List.Transform(_, Text.From), ","),
nameList = List.Transform(Text.Split(textValue, ","), Text.Trim),
uniqueNames = List.Distinct(nameList)
in
Text.Combine(uniqueNames, ", "),
type text
})
in
#"Cleaned InvoiceCreatedBy"