Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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:
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!
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?
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!
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.
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?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.