Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ATB1999
Regular Visitor

Hierarchies with categories present in multiple high-level areas

Hi all.

 

I am in Power BI and I am encountering an issue with hierarchies. I am using a dropdown filter to calculate a value based on country and certain regions; but I am seeing that duplicates are not feasible as when summing things up, if subcategories are duplicated, they get summed up + the dropdown filter does not allow for duplicates (let me give you an example):

 

I have sales data of all Europe (fisrst hierarchy level). If I want to know total sales of all the regions in Southern Europe (second hierarchy level; first grouping), I can by selecting the upper hierarchy filter. I also have another grouping for the European Union (second hierarchy level; first grouping), which of course, contains the hierarchies also of some countries present in the other grouping. When colocating things; and wanting to see the overall sales of Europe, I see that the overall sum is duplicated; and that the filter does not allow to have countries like Spain present in both dropdowns (therefore, I am forced to have Spain as an independent line and the European Union or Southern Europe also as independent items at the same level). You see below a screenshot of the EU being at the same level as countries, extremely frustrating to be honest:

ATB1999_0-1731054084845.png

 

 

Is there any way to allow items pertaining to multiple higher level hierarchies like Spain in multiple places for the filter to run? This would really mean the world to me!

4 REPLIES 4
danextian
Super User
Super User

the native slicer does not allow to not have the dropdowns for those countries with NA values in subcategories - do you mean exlude countries with NA subcategories from the dropdown or exclude NA subcategories only? If so, have you tried using the visual filter pane to exclude NA subcategories?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
saud968
Super User
Super User

Here are a few approaches you might consider:

1. Using a Bridge Table
Create a bridge table that maps each country to its respective regions. This table can then be used to filter your data without causing duplication. For example:

Table

Country Region
Spain Southern Europe
Spain European Union
France European Union
Italy Southern Europe
2. Hierarchical Slicers
Use hierarchical slicers that allow for multi-level selection. This can help in managing the selection of countries and regions more effectively.

3. DAX Calculations
Leverage DAX (Data Analysis Expressions) to create calculated columns or measures that handle the hierarchy logic. For instance, you can create a measure that checks if a country belongs to multiple regions and adjusts the calculation accordingly.

4. Data Modeling Adjustments
Consider restructuring your data model to better accommodate the hierarchical relationships. This might involve creating additional tables or relationships that can handle the complexity of your data.

Example DAX Measure
Here’s a simple example of a DAX measure that avoids double-counting:

Total Sales =
SUMX(
DISTINCT('Sales'[Country]),
CALCULATE(SUM('Sales'[Amount]))
)

This measure ensures that each country is only counted once in the total sales calculation.

Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

danextian
Super User
Super User

Hi @ATB1999 

The native slicer should allow a lower level hierarchy to be under different higher level hierarchies. This isn't the case, of course, if the column are from different tables as the viz will throw an error.

danextian_0-1731054578527.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian .

 

Thanks for the proposed solution. I disregarded the native slicer as there are some countries like the United States in my data thta contain multiple sub-states; and the native slicer does not allow to not have the dropdowns for those countries with NA values in subcategories (see the image below and the difference between Venzuela and the US). Nonetheless, I am unsure whether there is a way to keep being the case in the native slicer while also solving for the other issue. Do you have by any chance some advice on that?

 

ATB1999_0-1731072142975.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors