List.Mode Function in Power Query

The List.Mode function returns an item that appears most commonly in a list. If multiple items appear with the same maximum frequency, the last one is chosen. If the list is empty an exception is thrown.

Syntax

List.Mode(list as list, optional equationCriteria as any) as any

Example:

Power Query M

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

The output of the above code is “America”.

Example:

Power Query M

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

The output of the above code is China.