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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.