List.MaxN

Syntax

List.MaxN(list as list, countOrCondition as any, optional comparisonCriteria as any, optional includeNulls as nullable logical) as list

Description

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.

Reference Data

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / List Functions / List.MaxN