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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
DineshArivu
Regular Visitor

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors