List.PositionOfAny

This function returns the position of the first instance of a specified value in a given list. If the value is not found, the function returns -1. Users can also specify an optional parameter called "...

Syntax

List.PositionOfAny(list as list, values as list, optional occurrence as nullable number, optional equationCriteria as any) as any

About

This function returns the position of the first instance of a specified value in a given list. If the value is not found, the function returns -1. Users can also specify an optional parameter called "occurrence" to limit the number of instances returned.

Explanation

Locate the initial occurrence of the values 2 or 3 in the {1, 2, 3} data set using Power Query through the MList.PositionOfAny function. The output will be 1 in this case.