Table.Skip
The rows after the first ones: after a number of them, or after the top rows for which a condition holds.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.Skip(table as table, optional countOrCondition as any) as table
| Parameter | Type | Description |
|---|---|---|
table | table | The table to skip rows of. |
countOrCondition | any optional | How many rows to skip (1 when left out), or a condition: rows are skipped while it holds. |
Returns
table. The rest of the rows, in their order; none when you skip them all.
Remarks
- With a condition, skipping stops at the first row that fails it.
- It does what
Table.RemoveFirstNdoes.
Examples
After the first two
Table.Skip(#table({"Order"}, {{1}, {2}, {3}, {4}, {5}}), 2)
| Order |
|---|
| 3 |
| 4 |
| 5 |
Past the small orders at the top
Table.Skip(#table({"Order", "Amount"}, {{1, 5}, {2, 8}, {3, 250}, {4, 7}}), each [Amount] < 10)
| Order | Amount |
|---|---|
| 3 | 250 |
| 4 | 7 |
Order 4 is small too, but skipping stopped at order 3.
One row when no count is given
Table.Skip(#table({"Product"}, {{"Chair"}, {"Desk"}, {"Lamp"}}))
| Product |
|---|
| Desk |
| Lamp |
Related functions
Table.RemoveFirstN, Table.FirstN, Table.Range, Table.RemoveLastN.