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.
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
Id | User Name | User Name |
83792 | Samanta Smith | SMith |
92863 | SMith_1 |
Solved! Go to Solution.
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].
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"})
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.
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].
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"})
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.
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
79 | |
71 | |
64 |
User | Count |
---|---|
120 | |
105 | |
99 | |
81 | |
72 |