List.Min
This function retrieves the smallest item from the list, or the default value specified if the list is empty. You can also provide a comparison criteria to customize how the items in the list are comp...
List.Min(list as list, optional default as any, optional comparisonCriteria as any, optional includeNulls as nullable logical) as any
This function retrieves the smallest item from the list, or the default value specified if the list is empty. You can also provide a comparison criteria to customize how the items in the list are compared. If no comparison criteria is provided, the function will use the default comparer.
Identify the smallest value from the set of numbers {1, 4, 7, 3, -2, 5}.
In Power Query M language, use the function List.Min({1, 4, 7, 3, -2, 5}) to find the minimum value.
The output will be -2.
To find the minimum value in an empty list, return -1 as the result.
In Power Query M language, use the function List.Min({}, -1) to handle this scenario.
The output will be -1.