List.MaxN
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns the maximum values in the list. After the rows are sorted, optional parameters may be specified to further filter the result
List.MaxN(list as list, countOrCondition as any, optional comparisonCriteria as any, optional includeNulls as nullable logical) as list
| Argument | Description |
|---|---|
| list | The List to check. |
| countOrCondition | Specifies the number of values to return or a filtering condition. |
| optional comparisonCriteria | Specifies how to compare values in the list. |
| optional includeNulls | The Logical value whether or not to include null values in the return list. |
List.MaxN({3, 4, 5, -1, 7, 8, 2}, 5) equals {8, 7, 5, 4, 3}
Show: