List.Skip
A list without its first items: a set number of them, or as long as a condition holds.
Group: List. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
List.Skip(list as list, optional countOrCondition as any) as list
| Parameter | Type | Description |
|---|---|---|
list | list | The list. |
countOrCondition | any optional | A number of items to drop (1 when left out), or a function of one item: items are dropped while it answers true. |
Returns
list. The rest of the list.
Examples
Without the two header lines
List.Skip({"Report", "2024", "Coffee", "Tea"}, 2)
{"Coffee", "Tea"}
Skip the zeros at the start
List.Skip({0, 0, 12, 0, 7}, each _ = 0)
{12, 0, 7}
Only the leading zeros go; the zero between 12 and 7 stays.