List.Range Function in Power Query

The List.Range function returns a list contains the number of items from the list after the offset.

Syntax

List.Range(list as list, offset as number, optional count as nullable number) as list

The function has the following parameters:

Example: Returns the list items after an offset.

Power Query M

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

The output of the above code is shown below:

List.Range function in Power Query

Example: Returns the list items after an offset, and also specify the maximum number of items returned in the list.

Example:

Power Query M

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

The output of the above code is shown below:

List.Range function in Power Query