List.MaxN Function in Power Query
The List.MaxN function returns the maximum values 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 nullable logical) as list
Example: Return the top 3 maximum values from the list.
Power Query M
let Source = List.MaxN({13, 47, 345, -561, 77, 852, 12}, 3) in Source
The output will be shown in the following image:
