Loading...

Why DAX Can't Directly Reference Hierarchies in Power BI?

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 more
Power Platform , D365 CE & Cloud
Power Platform , D365 CE & Cloud

Dynamics 365 CE, Power Apps, Powerapps, Azure, Dataverse, D365,Power Platforms (Power Apps, Power Automate, Virtual Agent and AI Builder), Book Review

Share post:

Related posts

Why should I complete Power BI Performance Load Testing & initial setup

It is becoming increasingly important to understand how the Power BI reports/Semantic Model that are being used in your organization are perfo...

3 days ago

Power BI Copilot, AI Instructions And Preventing The Use Of Implicit Measures

In yet another entry in my series on what you should be doing in Power BI Copilot AI Instructions, in this post I want to address the most dif...

5 days ago

Power BI Copilot Summaries honor AI Instructions to provide non-English language responses

In working with Power BI Copilot one of the feedback requests I hear from my customers is being able to support non-English languages. While p...

7 days ago

Updates to Copilot in Power BI: More ways to see, learn from, and ask about your report data

This blog draft gives an overview of updates to access and learn from report data via Copilot.

11 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy