Table.MaxN

Syntax

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

Description

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

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / Table Functions / Table.MaxN