OpenBI Docs Buy

Table.RemoveRows

Takes out a run of rows at a position: one row, or a number of them.

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

Syntax

Table.RemoveRows(table as table, offset as number, optional count as nullable number) as table
ParameterTypeDescription
tabletableThe table to take rows out of.
offsetnumberThe position of the first row to take out, counting from 0.
countnullable number
optional
How many rows; 1 when left out.

Returns

table. The rows before and after the run, in their order.

Remarks

Examples

The second and third rows out

Table.RemoveRows(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 1, 2)
Order
1
4
5

Just the first row

Table.RemoveRows(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 0)
Order
2
3
4
5

Table.Range, Table.RemoveFirstN, Table.InsertRows, Table.ReplaceRows.

Last updated · OpenBI Studio 0.3.79