TOPNSKIP DAX Function (Table manipulation)
Retrieves a number of rows from a table efficiently, skipping a number of rows. Compared to TOPN, the TOPNSKIP function is less flexible, but much faster.
Syntax
Parameter | Attributes | Description |
---|---|---|
Rows |
Number of rows to return |
|
Skip |
Number of rows to skip |
|
Table Iterator |
Table expression made by physical columns of the data model that are not grouping the cardinality of the original table they belong to. |
|
OrderByExpression Row Context |
Optional |
Expression used to define the sort order of the result |
Order | Optional |
It can be ASC or 1 or TRUE to consider the OrderByExpression in an ascending order. |
Return values
The table returned is not sorted, it is just filtered according to the required parameters.
The sort order of the result depends on the ORDER BY condition of EVALUATE.
Remarks
If Skip is not 0, the Table expression must reference physical columns with lineage and does not support a filter context coming from context transition.
If there is a tie, in OrderBy_Expression values, at the N-th row of the table, then all tied rows are returned. Then, when there are ties at the N-th row the function might return more than n rows.
If N_Value is 0 (zero) then TOPN returns an empty table.
TOPNSKIP does not guarantee any sort order for the results.
Related articles
Learn more about TOPNSKIP in the following articles:
-
Querying raw data to Tabular
This article describes how to extract raw data stored in the Tabular engine, used by Analysis Service Tabular, Power BI, and Power Pivot. » Read more
Last update: Dec 28, 2020 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo