Returns the minimum value(s) in the list. The number of values to return or filtering condition may be specified.
function (
list
as list, optionalcountOrCondition
as nullable any, optionalcomparisonCriteria
as nullable any, optionalincludeNulls
as nullable any) as list
Returns the minimum value(s) in the list, list
. The parameter, countOrCondition
, specifies the number of values to return or a filtering condition. The optional parameter, comparisonCriteria
, specifies how to compare values in the list.
comparisonCriteria
: [Opional] An optional comparisonCriteria
value, may be specified to determine how to compare the items in the list. If this parameter is null, the default comparer is used.
List.Ordering
Find the 5 smallest values in the list {3, 4, 5, -1, 7, 8, 2}
.
List.MinN({3, 4, 5, -1, 7, 8, 2}, 5)
{-1, 2, 3, 4, 5}