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
Power Pages – Support for Power BI Embed Token v2 for Power Pages
We are announcing the ability to utilize Power BI Embed Token v2 for Power Pages. This feature will reach general availability on May 30, 2026...
Predicting the Future: Using Power BI to Identify Your Most Profitable Agencies
In the 2026 federal landscape, "growth" is no longer a broad target—it’s a surgical strike. If your executive team is still making "bid/no-bid...
Custom FetchXML Aggregation in Power Pages — Build a KPI Dashboard Without Power BI
Overview Power BI is a great tool — but it requires additional licensing, an embed configuration, and adds complexity to your portal architect...
Power BI Update - April 2026
Power BI Integration with GITHUB
While Azure DevOps is usually the easiest choice for Microsoft users, connecting Power BI to GitHub is becoming a must-have skill for anyone u...
Power BI April 2026 Feature Summary
Welcome to the April Power BI update! Power BI’s April 2026 update is here, bringing continued improvements across Copilot and AI, reporting, ...
How I Built a Full Power BI Semantic Model in Minutes Using Agentic AI and GitHub Copilot
In this second part of my blog series, I will show you how I edited the required files and then created my semantic model by using the Agentic...
A whirlwind tour on User-context-aware calculated columns in Power BI!
Bye, bye translation headaches! With the new User-context-aware calculated columns, we can tackle certain challenges more convenient than ever...
