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
| Parameter | Type | Description |
|---|---|---|
table | table | The table to cut. |
pageSize | number | Rows 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]})}