List.RemoveRange Function in Power Query

The List.RemoveRange function returns a list after removing the specified count of items starting at the index position. The count of items to remove is an optional parameter, if not specified the default count is 1.

Syntax

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

Example: Remove 4 values in the given list starting at index 2. The first item in the list has index 0.

Power Query M

let
  source = {"India", "America", "Canada", "Japan", "Australia", "England", "China"}, 
  return = List.RemoveRange(source, 2, 4)
in
  return      

The output of the above code is shown below:

List.RemoveRange function in Power Query