Table.AddFuzzyClusterColumn

MTabela

Adiciona a table uma nova coluna newColumnName com valores representativos de columnName. Os representantes são obtidos por correspondência difusa (fuzzy) dos valores de columnName em cada linha.

Sintaxe

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

Parâmetros

tabletableObrigatório

Tabela de entrada.

M
Table.FromRecords({...})
columnNametextObrigatório

Coluna cujos valores serão agrupados por correspondência difusa.

M
"Location"
newColumnNametextObrigatório

Nome da nova coluna com os valores representativos.

M
"Location_Cleaned"
optionsnullable recordOpcional

Registro de opções que define como comparar os valores.

M
[IgnoreCase = true, IgnoreSpace = true]

Retorna

table

Exemplo

M
Table.AddFuzzyClusterColumn(
    Table.FromRecords(
        {
            [EmployeeID = 1, Location = "Seattle"],
            [EmployeeID = 2, Location = "seattl"],
            [EmployeeID = 3, Location = "Vancouver"],
            [EmployeeID = 4, Location = "Seatle"],
            [EmployeeID = 5, Location = "vancover"],
            [EmployeeID = 6, Location = "Seattle"],
            [EmployeeID = 7, Location = "Vancouver"]
        },
        type table [EmployeeID = nullable number, Location = nullable text]
    ),
    "Location",
    "Location_Cleaned",
    [IgnoreCase = true, IgnoreSpace = true]
)

Resultado

M
Table.FromRecords(
    {
        [EmployeeID = 1, Location = "Seattle", Location_Cleaned = "Seattle"],
        [EmployeeID = 2, Location = "seattl", Location_Cleaned = "Seattle"],
        [EmployeeID = 3, Location = "Vancouver", Location_Cleaned = "Vancouver"],
        [EmployeeID = 4, Location = "Seatle", Location_Cleaned = "Seattle"],
        [EmployeeID = 5, Location = "vancover", Location_Cleaned = "Vancouver"],
        [EmployeeID = 6, Location = "Seattle", Location_Cleaned = "Seattle"],
        [EmployeeID = 7, Location = "Vancouver", Location_Cleaned = "Vancouver"]
    },
    type table [EmployeeID = nullable number, Location = nullable text, Location_Cleaned = nullable text]
)

Mais informações

Subgrupo
Table

Aprender Power Query ao vivo