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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
slyfox
Helper II
Helper II

Find like

Dear Colleagues,

 

Please tell me which operator is most suitable for my task. I have a simple table with 12,000 rows of accounts, some of which may be duplicates. How do I identify strings like this?
Considered a duplicate if User Name almost the same like already was

IdUser NameUser Name
83792Samanta Smith SMith
92863 SMith_1
1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @slyfox ,

 

1. In your data, if the values of the [User Name] column with similar user name are empty, then you can just delete the rows with empty values of column [User Name].

 

vkkfmsft_0-1633500156562.png

vkkfmsft_1-1633500219339.png

 

2. Or you can add a custom column and remove the rows that satisfy the condition: [User Name.1] = [Standard Name].

 

 

= Text.Select([User Name.1], {"a".."z","A".."Z"})

 

vkkfmsft_2-1633502431022.png

vkkfmsft_3-1633502461403.png

 

And the complete code is as follows:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsjA2tzRS0lEKTsxNzCtJVAjOzSzJUAAJ+AIZSrE60UqWRhZmxkARmGC8IVgYKGpiiCxsBBY2BBuWpxCVkZiXDmFDlEOVJuaB9McCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Id = _t, #"User Name" = _t, #"User Name.1" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Id", Int64.Type}, {"User Name", type text}, {"User Name.1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Standard Name", each Text.Select([User Name.1], {"a".."z","A".."Z"})),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([User Name.1] = [Standard Name]))
in
    #"Filtered Rows"

 

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @slyfox ,

 

1. In your data, if the values of the [User Name] column with similar user name are empty, then you can just delete the rows with empty values of column [User Name].

 

vkkfmsft_0-1633500156562.png

vkkfmsft_1-1633500219339.png

 

2. Or you can add a custom column and remove the rows that satisfy the condition: [User Name.1] = [Standard Name].

 

 

= Text.Select([User Name.1], {"a".."z","A".."Z"})

 

vkkfmsft_2-1633502431022.png

vkkfmsft_3-1633502461403.png

 

And the complete code is as follows:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsjA2tzRS0lEKTsxNzCtJVAjOzSzJUAAJ+AIZSrE60UqWRhZmxkARmGC8IVgYKGpiiCxsBBY2BBuWpxCVkZiXDmFDlEOVJuaB9McCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Id = _t, #"User Name" = _t, #"User Name.1" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Id", Int64.Type}, {"User Name", type text}, {"User Name.1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Standard Name", each Text.Select([User Name.1], {"a".."z","A".."Z"})),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([User Name.1] = [Standard Name]))
in
    #"Filtered Rows"

 

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

HarishKM
Impactful Individual
Impactful Individual

@slyfox Hey ,
you can use distnict( ) or Value( ) Dax Function to fulfill your requirement .Using this you will get unique record .

 

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards,
Harish Mishra

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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