The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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)
Id | Type | Name | ParentId | Language | Political System |
1 | Continent | Europe | |||
2 | Country | France | 1 | French | System A |
3 | Country | Germany | 1 | German | System B |
4 | Continent | Australia | |||
5 | Country | Australia | 4 | English | System B |
6 | State | NSW | 5 | ||
7 | City | Sydney | 6 |
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?
Solved! Go to Solution.
Thank you! I've used the blog post at https://www.daxpatterns.com/hierarchies/ to hide the blank rows in the hierarchy.