Pular para o conteúdo
officetuning.aiofficetuning.ai
TreinamentosConsultoriaBibliotecaFerramentasConteúdoPortfólio
Entrar
officetuning.aiofficetuning.ai

Treinamento, consultoria e mentoria para decidir, construir e aprender nas quatro frentes da marca.

AI · Data · Productivity · Dev · São Paulo
contato@officetuning.ai
TreinamentosPower BIExcelSQLPowerPointIA + ProdutividadeTodos os treinamentos
PortalConsultoriaBibliotecaPortfólioBackground BuilderDashboard CanvasConteúdo
InstitucionalPolítica de privacidadeInformações legais
© 2026 officetuning.ai · São Paulo
  1. Biblioteca
  2. Power Query (M)
  3. Funções M
  4. Table.FuzzyJoin

Table.FuzzyJoin

MTabela

Une as linhas de table1 às linhas de table2 com base em uma correspondência difusa (por similaridade de texto, não por igualdade) dos valores das colunas-chave selecionadas por key1 (para table1) e key2 (para table2). Por padrão é feita uma junção interna; joinKind permite escolher outro tipo.

Sintaxe

M
Table.FuzzyJoin(table1 as table, key1 as any, table2 as table, key2 as any, optional joinKind as nullable number, optional joinOptions as nullable record) as table

Parâmetros

table1tableObrigatório

Tabela à esquerda da junção.

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

Coluna(s)-chave de table1.

M
{"FirstName1"}
table2tableObrigatório

Tabela à direita da junção.

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

Coluna(s)-chave de table2.

M
{"FirstName2"}
joinKindnullable numberOpcional

Tipo de junção (padrão JoinKind.Inner).

M
JoinKind.LeftOuter
joinOptionsnullable recordOpcional

Registro de opções que define como comparar as chaves.

M
[IgnoreCase = true, IgnoreSpace = false]

Retorna

table

Exemplo

M
Table.FuzzyJoin(
    Table.FromRecords(
        {
            [CustomerID = 1, FirstName1 = "Bob", Phone = "555-1234"],
            [CustomerID = 2, FirstName1 = "Robert", Phone = "555-4567"]
        },
        type table [CustomerID = nullable number, FirstName1 = nullable text, Phone = nullable text]
    ),
    {"FirstName1"},
    Table.FromRecords(
        {
            [CustomerStateID = 1, FirstName2 = "Bob", State = "TX"],
            [CustomerStateID = 2, FirstName2 = "bOB", State = "CA"]
        },
        type table [CustomerStateID = nullable number, FirstName2 = nullable text, State = nullable text]
    ),
    {"FirstName2"},
    JoinKind.LeftOuter,
    [IgnoreCase = true, IgnoreSpace = false]
)

Resultado

M
Table.FromRecords({
    [
        CustomerID = 1,
        FirstName1 = "Bob",
        Phone = "555-1234",
        CustomerStateID = 1,
        FirstName2 = "Bob",
        State = "TX"
    ],
    [
        CustomerID = 1,
        FirstName1 = "Bob",
        Phone = "555-1234",
        CustomerStateID = 2,
        FirstName2 = "bOB",
        State = "CA"
    ],
    [
        CustomerID = 2,
        FirstName1 = "Robert",
        Phone = "555-4567",
        CustomerStateID = null,
        FirstName2 = null,
        State = null
    ]
})

Observações

joinKind: JoinKind.Inner (padrão), LeftOuter, RightOuter, FullOuter, LeftAnti, RightAnti, LeftSemi ou RightSemi. Opções de joinOptions: ConcurrentRequests (1 a 8; padrão 1), Culture (padrão ""), IgnoreCase (padrão true), IgnoreSpace (padrão true), NumberOfMatches, SimilarityColumnName (padrão null), Threshold (0,00 a 1,00; padrão 0,80) e TransformationTable (colunas "From" e "To"). Um Threshold de 1,00 só permite correspondências exatas.

Mais informações

Subgrupo
Table
Referência
https://learn.microsoft.com/pt-br/powerquery-m/table-fuzzyjoin
Função anteriorTable.FuzzyGroupPróxima função Table.FuzzyNestedJoin
Biblioteca