OpenBI Docs Buy

Table.Min

The row with the lowest value of a column, or of anything worked out from a row, as a record.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.Min(table as table, comparisonCriteria as any, optional default as any) as any
ParameterTypeDescription
tabletableThe rows to look through.
comparisonCriteriaanyA column name; a pair {name, Order.Descending}; a list of names or pairs; or a function of a row that gives the value to compare.
defaultany
optional
What comes back when the table has no rows; null when left out.

Returns

any. The winning row as a record; the default when the table is empty.

Remarks

  • One row comes back, with all of its columns. For the lowest few use Table.MinN; for the lowest value alone, List.Min on the column.

Examples

The first order of the year

let
    Orders = #table({"Order", "Date"}, {{1, #date(2026, 3, 4)}, {2, #date(2026, 1, 15)}, {3, #date(2026, 2, 2)}})
in
    Table.Min(Orders, "Date")
[Order = 2, Date = #date(2026, 1, 15)]

No rows, no default

Table.Min(#table({"Order", "Date"}, {}), "Date")
null

Table.Max, Table.MinN, List.Min, Table.Sort.

Last updated · OpenBI Studio 0.3.79