List.FirstN Function in Power Query

The List.FirstN function returns the first set of items in the list by specifying how many items to return or a qualifying condition provided by countOrCondition.

Syntax

List.FirstN(list as list, countOrCondition as any) as any

Example:

Power Query M

let
  Source = {"India", "America", "Canada", "Japan", "Australia", "England"}, 
  Return = List.FirstN(Source, 3)
in
  Return        

The output of the above code is shown below in the following image:

List.FirstN function in Power Query