Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
How do I clean the data like the figure below? I didn't find a similar function in the PQ interface.
Thanks!
Solved! Go to Solution.
Hi, @Anonymous ,
You can use Table.AddFuzzyClusterColumn() ,
@Daniil has a great blog post for that.
Best.
Mark this post as solution if this helps.
Hi, @Anonymous , you might want to try the following code,
let
typo = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk/NycxLL8nPU4rVAfOg3GIUfiZCOh9FNYwXCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [City = _t]),
misspelling = Table.FromList({"Welington City","CityWellingtons","City Wellingtin 443","Nr. 22 WellongtonCity"}, Splitter.SplitByNothing(), {"Addr"}),
#"Added Custom" = Table.AddColumn(misspelling, "Custom", each
List.Accumulate(
typo[City], _[Addr], (s, c) => Text.Replace(s, c, "Wellington")
)
)
in
#"Added Custom"
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @Anonymous
Alternatively, look for a commonality in the text and then create a Conditional Column
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Conditional Column" = Table.AddColumn(Source, "Custom", each if Text.Contains([City], "lingto", Comparer.OrdinalIgnoreCase) then "Wellington" else null)
in
#"Added Conditional Column"
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi, @Anonymous ,
You can use Table.AddFuzzyClusterColumn() ,
@Daniil has a great blog post for that.
Best.
Mark this post as solution if this helps.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |