TOPNPERLEVEL DAX Function (Table manipulation)

Syntax

TOPNPERLEVEL ( <Rows>, <Table>, <LevelsDefinition>, <NodesExpanded>, <LevelsBoundaries>, <RestartIndicatorColumnName> )
Parameter Attributes Description
Rows

Number of rows to return for each level

Table

Table expression containing the columns used to define logical levels

LevelsDefinition

Table containing rows defining the levels considering in the logical filter by level. Every row has 4 arguments: LevelNumber, TotalColumnName, ColumnName, FlagOrder
FlagOrder is 1 for visible columns and 0 for columns defining the sort order of the level

NodesExpanded

Table containing rows defining the items selected for each level. Every row has 4 arguments: Unknown, LevelNumber, ColumnName, ItemSelected

LevelsBoundaries

Table containing rows defining the boundaries for each level. Every row has 5 arguments: Unknown, LevelNumber, ColumnName, BoundaryItemValue, BoundaryType
BoundaryType is 1 for the last item displayed in the level and 2 for the first item displayed in the level

RestartIndicatorColumnName

Name of the column added to the result containing to indicate the presence of items before the row (1) or after the row (2).

Return values

Table An entire table or a table with one or more columns.

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

This is an undocumented extension function for Power BI that is not included in the Analysis Services engine.

Related functions

Other related functions are:

Last update: Feb 18, 2020   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation not available.
The function may be undocumented or unsupported. Check the Compatibility box on this page.

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of TOPNPERLEVEL? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.