This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register 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.