Table.MaxN(table as table, comparisonCriteria as any, countOrCondition as any) as table


Returns the largest row(s) in the table, given the comparisonCriteria. After the rows are sorted, the countOrCondition parameter must be specified to further filter the result. Note the sorting algorithm cannot guarantee a fixed sorted result. The countOrCondition parameter can take multiple forms:

Reference Data

Power Query M Functions / Table Functions / Table.MaxN