Table.AddFuzzyClusterColumn
TableAdds a column containing representative cluster values based on fuzzy matching of an existing column.
Syntax
Table.AddFuzzyClusterColumn(table as table, columnName as text, newColumnName as text, optional options as nullable record) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | The table to process. |
columnName | text | Yes | The name of the column to cluster. |
newColumnName | text | Yes | The name for the new column containing cluster representative values. |
options | record | No | Optional record with fuzzy options: Threshold, IgnoreCase, IgnoreSpace, NumberOfMatches, TransformationTable. |
Return Value
table — The original table with a new column containing the canonical cluster representative for each row.
Remarks
Table.AddFuzzyClusterColumn assigns each row to a cluster based on approximate string similarity of the specified column, then adds a new column containing the representative (canonical) value for that cluster. All variants that fuzzy-match each other receive the same representative value.
Unlike Table.FuzzyGroup, this function preserves all original rows and simply annotates them with a cluster label — it does not aggregate. This makes it useful for previewing cluster assignments before deciding how to proceed.
Examples
Example 1: Add a cluster column for company names
Table.AddFuzzyClusterColumn(
#table({"Company"}, {{"Microsoft"}, {"Micosoft"}, {"MICROSOFT"}, {"Google"}, {"Gogle"}}),
"Company",
"ClusterCompany"
)Result
Company | ClusterCompany | |
|---|---|---|
| 1 | Microsoft | Microsoft |
| 2 | Micosoft | Microsoft |
| 3 | MICROSOFT | Microsoft |
| 4 | ||
| 5 | Gogle |
Example 2: Apply a lower threshold for more aggressive clustering
Table.AddFuzzyClusterColumn(
#table({"City"}, {{"New York"}, {"New-York"}, {"Newyork"}, {"NY"}}),
"City",
"CanonicalCity",
[Threshold = 0.6]
)Result
City | CanonicalCity | |
|---|---|---|
| 1 | New York | New York |
| 2 | New-York | New York |
| 3 | Newyork | New York |
| 4 | NY | New York |
Compatibility
✓ Power BI Desktop✓ Power BI Service✗ Excel Desktop✗ Excel Online✓ Dataflows✓ Fabric Notebooks