Power Query
published
Search
K

List.Mode

List.Mode

Returns the most frequent value in the list.
function (list as list, optional equationCriteria as nullable any) as nullable any

Description

Returns the item that appears most frequently in the list, list. If the list is empty an exception is thrown. If multiple items appear with the same maximum frequency, the last one is chosen. An optional comparisonCriteria value, equationCriteria, can be specified to control equality testing.

Category

List.Averages

Examples

Find the item that appears most frequently in the list {"A", 1, 2, 3, 3, 4, 5}.
List.Mode({"A", 1, 2, 3, 3, 4, 5})
3
Find the item that appears most frequently in the list {"A", 1, 2, 3, 3, 4, 5, 5}.
List.Mode({"A", 1, 2, 3, 3, 4, 5, 5})
5
Last modified 4yr ago