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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ivan_wilson
Regular Visitor

How to filter items in a hierarchy but still include child items

I have a table that includes a parent-child hierarchy. There are a few properties that are only defined for items at level 2 of the hierarchy. I want to display a matrix that shows the hierarchy of items, but also includes slicers based on the properties assigned to level 2 items. 

 

As an example, assume the table contains details about Continents, Countries, States and Cities. If a row represents a Country, it may also include properties for primary language, currency, political system. Each row is related to parent (except for Continents)

 

IdTypeNameParentIdLanguagePolitical System
1ContinentEurope   
2CountryFrance1FrenchSystem A
3CountryGermany1GermanSystem B
4ContinentAustralia   
5CountryAustralia4EnglishSystem B
6StateNSW5  
7CitySydney6  

 

I have set up my Path and Levels columns and configured a hierarchy for Continent, Country, State, City.

 

I add a Matrix to the canvas and include the hierarchy. I then add a slicer using the Language column. When I set a slicer, the matrix is filtered to show the Continent and Country. How can I also include the States and Cities for the filtered list of Countries?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lbendlin_0-1700854073264.png

Good luck rendering your ragged hierarchy...

lbendlin_1-1700854361748.png

 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

lbendlin_0-1700854073264.png

Good luck rendering your ragged hierarchy...

lbendlin_1-1700854361748.png

 

Thank you! I've used the blog post at https://www.daxpatterns.com/hierarchies/ to hide the blank rows in the hierarchy.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors