List.Mode

List

Returns the most frequently occurring value in the list. If there is a tie, returns the first mode encountered.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

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

Parameters

NameTypeRequiredDescription
listlistYesThe list to find the mode of.
equationCriteriaanyNoAn optional equation criteria to control how equality is determined when finding duplicate values.

Return Value

anyThe most frequently occurring value in the list.

Remarks

List.Mode returns the single value that appears most frequently in the list — the statistical mode. If multiple values are tied for the highest frequency, it returns the first tied value encountered in the original list order. To retrieve all tied modes, use List.Modes instead.

Null values are counted as occurrences and can be returned as the mode if null appears more frequently than any other value. Comparison is case-sensitive for text by default; pass Comparer.OrdinalIgnoreCase as the optional equationCriteria for case-insensitive mode detection. An empty list causes an error — guard with List.IsEmpty if needed.

List.Mode returns a single scalar value, not a list. This makes it directly usable in expressions without indexing. Common uses include finding the most common category, the most frequent response in survey data, or the most popular product in a transaction log.

Examples

Example 1: Single clear mode

List.Mode({1, 2, 2, 3, 3, 3, 4})
Result
Result
13

Example 2: Mode of text values

List.Mode({"A", "B", "A", "C", "B", "A"})
Result
Result
1A

Example 3: Most common category in a dataset

let
    Categories = {"Electronics", "Clothing", "Electronics", "Books", "Clothing", "Electronics"},
    MostCommon = List.Mode(Categories)
in
    MostCommon
Applied Steps

The final output — returns the most frequently occurring value in the Categories list, which is "Electronics" with 3 occurrences.

Result
1Electronics

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks