Table.Min

This function retrieves the row with the smallest value in the table, based on the comparisonCriteria provided. If the table contains no rows, an optional default value can be specified to be returned...

Syntax

Table.Min(table as table, comparisonCriteria as any, optional default as any) as any

About

This function retrieves the row with the smallest value in the table, based on the comparisonCriteria provided. If the table contains no rows, an optional default value can be specified to be returned instead.

Explanation

Example 1 Identify the row containing the smallest value in column [a] within the table. Usage: In Power Query M: MTable.Min( Table.FromRecords({ [a = 2, b = 4], [a = 6, b = 8] }), "a" ) Output: [a = 2, b = 4] Example 2 Locate the row with the smallest value in column [a] in the table. If there are no values, return -1. Usage: In Power Query M: Table.Min(#table({"a"}, {}), "a", -1) Output: -1