Table.RemoveRows

This function eliminates a specified number of rows from the table, starting from the specified offset. If no count parameter is given, a default count of 1 row will be removed.

Syntax

Table.RemoveRows(table as table, offset as number, optional count as nullable number) as table

About

This function eliminates a specified number of rows from the table, starting from the specified offset. If no count parameter is given, a default count of 1 row will be removed.

Explanation

Example 1 Delete the initial entry from the table. Usage Power Query M Table.RemoveRows( Table.FromRecords({ [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"], [CustomerID = 3, Name = "Paul", Phone = "543-7890"], [CustomerID = 4, Name = "Ringo", Phone = "232-1550"] }), 0) Output Table.FromRecords({ [CustomerID = 2, Name = "Jim", Phone = "987-6543"], [CustomerID = 3, Name = "Paul", Phone = "543-7890"], [CustomerID = 4, Name = "Ringo", Phone = "232-1550"] }) Example 2 Remove the row in the first position from the table. Usage Power Query M Table.RemoveRows( Table.FromRecords({ [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"], [CustomerID = 3, Name = "Paul", Phone = "543-7890"], [CustomerID = 4, Name = "Ringo", Phone = "232-1550"] }), 1) Output Table.FromRecords({ [CustomerID = 1, Name = "Bob", Phone =