List.MaxN
Returns the maximum value(s) in the list. The number of values to return or a filtering condition must be specified.
Syntax
List.MaxN(
list as list,
countOrCondition as any,
optional comparisonCriteria as any,
optional includeNulls as logical
) as list
Remarks
Returns the maximum value(s) in the list, list
. After the rows are sorted, optional parameters may be specified to further filter the result. The optional 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.
-
list
: The list of values. -
countOrCondition
: If a number is specified, a list of up tocountOrCondition
items in ascending order is returned. If a condition is specified, a list of items that initially meet the condition is returned. Once an item fails the condition, no further items are considered. comparisonCriteria
: [Optional] An optionalcomparisonCriteria
value can 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