List.Min

List

Returns the minimum value from a list.

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

Syntax

List.Min(list as list, optional default as nullable any, optional comparisonCriteria as any, optional includeNulls as nullable logical) as any

Parameters

NameTypeRequiredDescription
listlistYesThe list to search.
defaultanyNoValue returned when the list is empty. Defaults to null.
comparisonCriteriaanyNoA comparer or key selector for custom ordering.
includeNullslogicalNoWhether to include null values in the comparison. Defaults to false.

Return Value

anyThe smallest value in the list, or the default value if the list is empty.

Remarks

List.Min returns the smallest value in a list. Null values are excluded from comparison by default. If the list is empty, null is returned unless a default value is provided.

The optional comparisonCriteria parameter accepts a comparer function or a key selector (for example, each Text.Length(_) to find the shortest text).

Use List.Min on a table column by first extracting it with Table.Column.

Examples

Example 1: Find the minimum of a list of numbers

List.Min({5, 3, 8, 1, 9})
Result
Result
11

Example 2: Find the earliest date in a column

let
    Dates  = Table.Column(Sales, "OrderDate"),
    Oldest = List.Min(Dates)
in
    #table({"EarliestOrder"}, {{Oldest}})
Applied Steps

The final output — wraps the earliest date into a single-row table with an "EarliestOrder" column header.

EarliestOrder
11/15/2024

Compatibility

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