Table.Range
The rows from a position on: all of them to the end, 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.Range(table as table, offset as number, optional count as nullable number) as table
| Parameter | Type | Description |
|---|---|---|
table | table | The table to take rows from. |
offset | number | The position of the first row to keep, counting from 0. |
count | nullable number optional | How many rows to keep; up to the end when left out. |
Returns
table. Those rows with all of the table's columns; fewer when the table ends first.
Examples
Three rows from the second on
Table.Range(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 1, 3)
| Order |
|---|
| 2 |
| 3 |
| 4 |
From the third row to the end
Table.Range(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 2)
| Order |
|---|
| 3 |
| 4 |
| 5 |