List.Positions

This function provides a list of positions for the input list. When utilizing List.Transform to modify a list, the list of offsets can be used to grant the transform access to the position.

Syntax

List.Positions(list as list) as list

About

This function provides a list of positions for the input list. When utilizing List.Transform to modify a list, the list of offsets can be used to grant the transform access to the position.

Explanation

Determine the positions of values in the list {1, 2, 3, 4, null, 5} using Power Query MList.Positions({1, 2, 3, 4, null, 5}). The output will be {0, 1, 2, 3, 4, 5}.