List.MinN Function in Power Query

The List.MinN function returns the minimum values in a list. The number of values to return or a filtering condition may be specified.

Syntax

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

Example: Find the 3 smallest values in the given list.

Power Query M

let
    Source = List.MinN({13, 47, 345, -561, 77, 852, 12}, 3)
in
    Source    

The output will be shown in the following image:

List.MinN function in Power Query