description | title | ms.service | ms.subservice | ms.date | ms.topic | author | ms.author | recommendations |
---|---|---|---|---|---|---|---|---|
Learn more about: ISATLEVEL |
ISATLEVEL function (DAX) | Microsoft Docs |
powerbi |
dax |
02/20/2024 |
reference |
jewang-msft |
jewang |
false |
[!INCLUDEapplies-to-visual-calculations]
Reports whether the column is present at the current level.
ISATLEVEL ( <column> )
Term | Definition |
---|---|
column | A grouping column in the data grid. |
TRUE or FALSE that indicates whether the grouping column is at the current level in the context.
- This function can be used only in visual calculations.
- Unlike other functions with similar functionality, such as ISINSCOPE, ISFILTERED, HASONEVALUE, and so on, ISATLEVEL is a function specialized for visual calculations, therefore it is guaranteed to be compatible with functions that navigate the levels of a hierarchy in the data matrix, such as EXPAND and COLLAPSE.
- A hierarchy level can contain more than one column. For example, in a [Year], [Quarter], [Month] hierarchy, the level that contains the [Quarter] column also includes the [Year] column at the same level.
Consider a table that includes a hierarchy with levels for total, year, quarter, and month. The following DAX calculations can be used to determine whether a specific column is at the current level in the original context or at the new level after a navigation operation.
IsYearLevel = ISATLEVEL([Fiscal Year])
IsQuarterLevel = ISATLEVEL([Fiscal Quarter])
IsMonthLevel = ISATLEVEL([Month])
IsQuarterLevelAfterExpand = EXPAND(ISATLEVEL([Fiscal Quarter]), ROWS)
IsQuarterLevelAfterCollapse = COLLAPSE(ISATLEVEL([Fiscal Quarter]), ROWS)
The screenshot below shows the matrix with the five visual calculations.
EXPAND
EXPANDALL
COLLAPSE
COLLAPSEALL
ISINSCOPE
ISFILTERED
HASONEVALUE