Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DineshArivu
Helper I
Helper I

Remove duplicate names in a same column

Hi Experts,

 

Below the attached table snaps where we can se invoice created date and created by .

Some rows you can see names are repeated even it is same name.

We should showcase only one time a name if it is repeated for multiple times invoice created date (see last 6 rows as a reference)

Invoice created on 2 different dates but both created by same person , so we should not highlight the name 2 times (if different person created then we should display 2 different person names).

 

DineshArivu_0-1755706893175.png

 

Please help me to achieve this .. If required i can share full M query.

 

Thanks

DK

 

1 ACCEPTED SOLUTION

@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"

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @DineshArivu,

before

dufoq3_0-1755714218179.png

 

after

dufoq3_1-1755714235855.png

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
    DistinctCreatedBy

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

@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"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.