Table.Split

Sintaxe

Table.Split(table as table, pageSize as number) as list

Sobre

Divide o table em uma lista de tabelas em que o primeiro elemento da lista é uma tabela que contém as primeiras pageSize linhas da tabela de origem, o próximo elemento da lista é uma tabela que contém as próximas pageSize linhas da tabela de origem e assim por diante.

Exemplo 1

Divida uma tabela de cinco registros em tabelas com dois registros cada.

Usage

let
    Customers = 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 = "Cristina", Phone = "232-1550"],
        [CustomerID = 5, Name = "Anita", Phone = "530-1459"]
    })
in
    Table.Split(Customers, 2)

Saída

{
    Table.FromRecords({
        [CustomerID = 1, Name = "Bob", Phone = "123-4567"],
        [CustomerID = 2, Name = "Jim", Phone = "987-6543"]
    }),
    Table.FromRecords({
        [CustomerID = 3, Name = "Paul", Phone = "543-7890"],
        [CustomerID = 4, Name = "Cristina", Phone = "232-1550"]
    }),
    Table.FromRecords({
        [CustomerID = 5, Name = "Anita", Phone = "530-1459"]
    })
}