OpenBI Docs Buy

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
ParameterTypeDescription
tabletableThe table to cut.
countnumberHow 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]})}

Table.Split, Table.FirstN, Table.Skip.

Last updated · OpenBI Studio 0.3.79