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
| Parameter | Type | Description |
|---|---|---|
table | table | The rows to look through. |
comparisonCriteria | any | A 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. |
default | any 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.Minon 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