Power Query
published
Search
⌃K

List.Min

List.Min

Returns the minimum value or the default value for an empty list.
function (list as list, optional default as nullable any, optional comparisonCriteria as nullable any, optional includeNulls as nullable any) as nullable any

Description

Returns the minimum item in the list list, or the optional default value default if the list is empty. An optional comparisonCriteria value, comparisonCriteria, may be specified to determine how to compare the items in the list. If this parameter is null, the default comparer is used.

Category

List.Ordering

Examples

Find the min in the list {1, 4, 7, 3, -2, 5}.
List.Min({1, 4, 7, 3, -2, 5})
-2
Find the min in the list {} or return -1 if it is empty.
List.Min({}, -1)
-1