List.Mode
Returns the most frequent value in the list.
Syntax
List.Mode(
list as list,
optional equationCriteria as any
) as any
Remarks
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.
Examples
Example #1
Find the item that appears most frequently in the list <code>{"A", 1, 2, 3, 3, 4, 5}</code>.
List.Mode({"A", 1, 2, 3, 3, 4, 5})
Result:
3
Example #2
Find the item that appears most frequently in the list <code>{"A", 1, 2, 3, 3, 4, 5, 5}</code>.
List.Mode({"A", 1, 2, 3, 3, 4, 5, 5})
Result:
5
Category
List.Averages