Why DAX Can't Directly Reference Hierarchies in Power BI?
๐ What is a Hierarchy in Power BI?
A hierarchy in Power BI is a structured arrangement of related columns that allows users to drill down from a higher-level category to a more detailed level.
๐น Example of a Hierarchy
Consider a Date Hierarchy:
- Year โ Quarter โ Month โ Day
Or a Geography Hierarchy:
- Country โ State โ City
๐ซ Why Canโt DAX Refer to a Hierarchy or Hierarchy Level?
DAX can only reference columns, measures, and tables, but not hierarchy objects directly. This is because a hierarchy is a UI feature in Power BI, not an actual data model object.
However, you can reference each level of the hierarchy individually using its column name.
โ Alternative Approach Using DAX
If you want to calculate something for a specific level in a hierarchy, you must use the underlying column:
๐ธ Example: Total Sales by Year (from Date Hierarchy)
TotalSalesByYear = CALCULATE(SUM(Sales[Revenue]), VALUES(Sales[Year]))
This formula references Sales[Year], not the entire hierarchy.
Published on:
Learn moreRelated posts
Excel or Power BI: Why Start Over?
Power BI, M365 Copilot And The Importance Of DAX UDFs
This was a big week for Power BI Copilot with the announcement of a new direction for the feature. If you haven’t done so already, read ...
Power BI Update - July 2026
Microsoft Copilot (Microsoft 365): Power BI integration in M365 Copilot
This release enables M365 Copilot to reason over Power BI enterprise data and returns grounded answers directly from Power BI reports and sema...
Using Fabric Operations Agents And Workspace Monitoring With Power BI
This week, in the announcement about support for Fabric Pipelines in Workspace Monitoring, I noticed that it came with an Operations Agent tha...
