Forum Discussion
Clean column containing inconsistent data entered people
- 5 years ago
Hello Anonymous
you can use Table.FuzzyNestedJoin. Use the joinOptions to define treshold and other options to change the outcome. However you didn't specify that all content is always replaced with the value of the to-column or you need a replacement. If the second is the case you could use both of your column from and to to search for the "from" and replace it with the "to"
Here to code
let Topic = let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXKOUHBNSU9VitWJVjIC8uEcYyDHsag0KVHBOSc1sSggsbgYLG4C0oQQiQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Meeting Id" = _t, Column1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Meeting Id", Int64.Type}, {"Column1", type text}}) in #"Changed Type", Transformation = let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck1JT1XSUXL0D9Z1jtB1dXF3VYrViVZyzklNLApILC4GyiHYsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [From = _t, To = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"From", type text}, {"To", type text}}) in #"Changed Type", JoinFuzzy = Table.FuzzyNestedJoin ( Topic, "Column1", Transformation, "From", "New", JoinKind.LeftOuter, [Threshold=0.5, IgnoreCase=true] ), #"Expanded New" = Table.ExpandTableColumn(JoinFuzzy, "New", {"To"}, {"To"}) in #"Expanded New"THis is the output
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Jimmy801 I've updated my orginal post with a picture of a simplified example. Hopefully this can clarify the issue.
Anonymous please provide data per links below. We cannot paste images into Power BI.
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
- Anonymous5 years agoNot applicable
edhans thank you for the link, it is useful to understand how to post better questions. I posted a link to my pbxi file with all the data, and thought that along with the description, it was clear.
Can you tell me how I could have been more clear? I am genuinely courious, as I a new here and would like help maintain a good experience for everyone.
- edhans5 years ago
Community Champion
It isn't a matter of clarity so much as usability of data. Screen caps are great for expected results, but you are asking me or others to key this data in. Provide a file link or a table per the links I gave. Then we can spend time solving the problem, not retyping data.
- Anonymous5 years agoNot applicable
edhans This is the part I don't understand, if you see my orginal post I linked to a PBI file containing my data and my test query. I'm not sure I could have presented the data in a better way.