Sintaxe
M
Table.SelectColumns(table as table, columns as any, optional missingField as nullable number) as tableParâmetros
- tabletableObrigatório
Tabela de origem.
MTable.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"], ...})- columnsanyObrigatório
Coluna ou lista de colunas a retornar.
M"Name"- missingFieldnullable numberOpcional
O que fazer se a coluna não existir.
Retorna
tableExemplo
M
Table.SelectColumns(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
"Name"
)Resultado
M
Table.FromRecords({
[Name = "Bob"],
[Name = "Jim"],
[Name = "Paul"],
[Name = "Ringo"]
})Mais informações
- Subgrupo
- Table