Table.SplitAt
Cuts a table in two after a number of rows.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.SplitAt(table as table, count as number) as list
| Parameter | Type | Description |
|---|---|---|
table | table | The table to cut. |
count | number | How many rows go to the first table. |
Returns
list. Two tables: the first count rows, then the rest.
Examples
The first two orders and the others
Table.SplitAt(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 2)
{Table.FromRecords({[Order = 1], [Order = 2]}), Table.FromRecords({[Order = 3], [Order = 4], [Order = 5]})}