Downloads
Power Query MList: pick and buildBeginner

List.Skip

Returns a list with the first items removed, either a set number or the run of items at the start that pass a test.

Syntax
List.Skip(list, optional countOrCondition)

Returns: The rest of the list, after the skipped items.

What it does

List.Skip removes items from the front of a list and returns what is left. The most common use is removing a header or an opening balance that was included by accident. It is the opposite of List.FirstN. If you give no count, it skips one item.

Syntax and arguments

Example

A text export puts a title line before the amounts. The first item is the title, and the amounts should be totalled without it.

let
    ExportLines = {"Amount (USD)", "1250.00", "480.00", "75.00"},
    Amounts = List.Skip(ExportLines, 1),
    Numbers = List.Transform(Amounts, Number.FromText),
    Total = List.Sum(Numbers)
in
    Total

Amounts drops the title, so Total is the sum of 1250, 480 and 75, which is 1805. Without the skip, Number.FromText would fail on the title line.

Example: a second, different use

Skipping the opening balance and keeping the movements: List.Skip(Steps, 1) removes the seed from a running balance list built with List.Accumulate.

Things to watch

In business terms

Removing title rows from bank and system exports, dropping an opening balance from a running total and skipping a header in a list of amounts all use this function. Note the number of items skipped in the workpaper, so the removal can be checked.

Related functions

All Power Query M functions · View as Markdown · M basics