List.RemoveRange

Eliminates the count values in the list beginning at the specified position, index.

Syntax

List.RemoveRange(list as list, index as number, optional count as nullable number) as list

About

Eliminates the count values in the list beginning at the specified position, index.

Explanation

Eliminate three values from the listed data {1, 2, 3, 4, -6, -2, -1, 5} starting from the fourth index. To achieve this in Power Query, use the MList.RemoveRange function with the parameters ({1, 2, 3, 4, -6, -2, -1, 5}, 4, 3). The resulting output will be {1, 2, 3, 4, 5}.