OpenBI Docs Buy

Table.Split

Cuts a table into tables of a given number of rows each.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.Split(table as table, pageSize as number) as list
ParameterTypeDescription
tabletableThe table to cut.
pageSizenumberRows per table; the last one gets what is left.

Returns

list. The tables in order; an empty list for a table without rows.

Examples

Pages of two orders

Table.Split(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 2)
{Table.FromRecords({[Order = 1], [Order = 2]}), Table.FromRecords({[Order = 3], [Order = 4]}), Table.FromRecords({[Order = 5]})}

Table.SplitAt, Table.Partition, Table.Range, List.Split.

Last updated · OpenBI Studio 0.3.79