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

Automating Power BI Load Testing with Fabric Notebooks – Part 1: Capturing Real Queries

Load testing is essential when working with Microsoft Fabric capacity. With limited resources, deploying a Power BI report without testing can...

2 days ago

Introducing Improvements to the Report Copilot in Power BI

We’ve upgraded the Report Copilot experience in Power BI, making it easier than ever to create, edit, and refine beautiful, data-rich re...

4 days ago

Power BI October 2025 Feature Summary

This month’s update brings exciting opportunities for learning and community engagement, including the upcoming Fabric Skills Fest and t...

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