Table.AddFuzzyClusterColumn

Table

Adds a column containing representative cluster values based on fuzzy matching of an existing column.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.AddFuzzyClusterColumn(table as table, columnName as text, newColumnName as text, optional options as nullable record) as table

Parameters

NameTypeRequiredDescription
tabletableYesThe table to process.
columnNametextYesThe name of the column to cluster.
newColumnNametextYesThe name for the new column containing cluster representative values.
optionsrecordNoOptional record with fuzzy options: Threshold, IgnoreCase, IgnoreSpace, NumberOfMatches, TransformationTable.

Return Value

tableThe 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
1MicrosoftMicrosoft
2MicosoftMicrosoft
3MICROSOFTMicrosoft
4GoogleGoogle
5GogleGoogle

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
1New YorkNew York
2New-YorkNew York
3NewyorkNew York
4NYNew York

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks