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
The Power BI Dataviz World Champs is back!
Join the Power BI Dataviz World Championships – three rounds of visualization challenges, community voting, and a live finale at FabCon ...
Power BI Report metadata defaults to Power BI Enhanced Report format (PBIR)
Starting January 25, 2026, Power BI reports will default to the Enhanced Report format (PBIR), improving source control and collaboration. Exi...
Diagnosing Power BI DirectQuery Performance Problems Caused By SQL Queries That Return Large Resultsets
One very common cause of Power BI performance problems is having a table with a large number of rows on your report. It’s a problem I wr...
What happened in DAX in 2025
Diagnosing Power BI DirectQuery Connection Limit Problems With Performance Analyzer
To kick off my series on diagnosing Power BI performance problems with Performance Analyzer in the browser (which I introduced last week with ...
