Table of contents
TOC
Collapse the table of content
Expand the table of content

Table.Min

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns the smallest row or rows from a table using a comparisonCriteria.

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

Arguments

ArgumentDescription
tableThe Table to check.
comparisonCriteriaSmallest row or rows comparison criteria.
optional defaultDefault value.

Remarks

  • Table.Min is similar to List.Min but requires a table as input.

Example

let  
  
    Employees = Table.FromRecords(  
  
        {[Name="Bill",   Level=7,  Salary=100000],  
  
        [Name="Barb",   Level=8,  Salary=150000],  
  
        [Name="Andrew", Level=6,  Salary=85000],  
  
        [Name="Nikki",  Level=5,  Salary=75000],  
  
        [Name="Margo",  Level=3,  Salary=45000],  
  
        [Name="Jeff",   Level=10, Salary=200000]},  
  
    type table [  
  
        Name = text,  
  
        Level = number,  
  
        Salary = number  
  
])  
  
in  
  
    Table.Min(Employees, "Salary")  
  
equals [Name = "Margo", Level = 3, Salary = 45000]  
NameMargo
Level3
Salary45000
© 2018 Microsoft