TOPN is a DAX function that returns the top N rows from a table based on a specified expression.
Syntax
TOPN(
N_Value,
Table,
[ OrderBy_Expression, ... ],
[ Order, ... ]
)
Argument | Properties | Description |
---|---|---|
N_Value | The number of rows to return. | |
Table | An expression that defines the table from which rows are to be returned. | |
OrderBy_Expression | Optional, Repeatable | Expression to be used for sorting the table. |
Order | Optional, Repeatable | The order to be applied. 0/FALSE/DESC – descending; 1/TRUE/ASC – ascending. |