OpenBI Docs Buy

List.RemoveFirstN

A list without its first items: a set number of them, or as long as a condition holds.

It does what List.Skip does; both names are in use.

Group: List. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

List.RemoveFirstN(list as list, optional countOrCondition as any) as list
ParameterTypeDescription
listlistThe list.
countOrConditionany
optional
A number of items to remove (1 when left out), or a function of one item: items are removed while it answers true.

Returns

list. The rest of the list.

Examples

Drop the first item

List.RemoveFirstN({"Total", "Coffee", "Tea"})
{"Coffee", "Tea"}

Drop the first three

List.RemoveFirstN({1, 2, 3, 4, 5}, 3)
{4, 5}

List.Skip, List.RemoveLastN, Table.RemoveFirstN.

Last updated · OpenBI Studio 0.3.79