Nota
O acesso a esta página requer autorização. Pode tentar iniciar sessão ou alterar os diretórios.
O acesso a esta página requer autorização. Pode tentar alterar os diretórios.
Sintaxe
Table.Combine(tables as list, optional columns as any) as table
Sobre nós
Devolve uma tabela que resulta da anexação de uma lista de tabelas, tables. A tabela resultante terá uma estrutura de tipo de linha definida por columns ou por uma união dos tipos de entrada, se columns não for especificado.
Exemplo 1
Juntar três mesas.
Utilização
Table.Combine({
Table.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"]}),
Table.FromRecords({[CustomerID = 2, Name = "Jim", Phone = "987-6543"]}),
Table.FromRecords({[CustomerID = 3, Name = "Paul", Phone = "543-7890"]})
})
Output
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Exemplo 2
Anexe três tabelas com diferentes estruturas.
Utilização
Table.Combine({
Table.FromRecords({[Name = "Bob", Phone = "123-4567"]}),
Table.FromRecords({[Fax = "987-6543", Phone = "838-7171"]}),
Table.FromRecords({[Cell = "543-7890"]})
})
Output
Table.FromRecords({
[Name = "Bob", Phone = "123-4567", Fax = null, Cell = null],
[Name = null, Phone = "838-7171", Fax = "987-6543", Cell = null],
[Name = null, Phone = null, Fax = null, Cell = "543-7890"]
})
Exemplo 3
Adicione duas tabelas e projete sobre o tipo dado.
Utilização
Table.Combine(
{
Table.FromRecords({[Name = "Bob", Phone = "123-4567"]}),
Table.FromRecords({[Fax = "987-6543", Phone = "838-7171"]}),
Table.FromRecords({[Cell = "543-7890"]})
},
type table [CustomerID = text, Name = text]
)
Output
Table.FromRecords({
[CustomerID = null, Name = "Bob"],
[CustomerID = null, Name = null],
[CustomerID = null, Name = null]
})