March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Scenario:
In this scenario, the column [City] in my table has some dirty data with some space and case errors. It's also a mixture of abbreviations and full names of the cities.
I want to find a way to unify the value of the column ‘City’ into the abbreviation of the cities, and merge this abbreviation into the column name of the table to display the table data horizontally with Forecasted Gross and Forecasted Net.
The original status of the main table is like below:
Expected result:
Detailed steps:
2. Go to the “Queries”->Table, click on the “Advanced Editor”, enter the part of M code in box after the step “Changed Type” and before the operator “in”:
Click on “Done” and you will see a new column like this:
3. Click on the column [City_Expanded]->”Unpiovt columns”:
Finally, we can get the expected output in the Power BI like this:
Reference links:
Table.AddFuzzyClusterColumn - PowerQuery M | Microsoft Docs
Author: Robert Qin
Reviewer: Ula Huang, Kerry Wang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.