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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
jtooke
Helper I
Helper I

Slicer and Visualization Hierarchy

Hi,

I have a data set with a Region - SubRegion - Country hierarchy, with a slicer and visualizations using all 3 levels. My standard view shows all by Region with users being able to drill to lower levels of the hierarchy. 

What I am looking to accomplish is if a user expands the slicer hierarchy to view by level 2 or 3, when they make a selection I want the visualizations to update according to the next hierarchy level. So for instance, if a user expands EMEA in their slicer and selects Europe, the visualizations should show all of the countries within Europe.

Is this possible?

Thanks!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @jtooke 

This will require a disconnected table and another measure referencencing such. There are only two levels in the hierarchy below but notice that whenever a district is selected (level 1), the column chart automatically shows all schools within that district within the need to drilldown.

danextian_0-1767960345161.gif

 

Please see the attached pbix.





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.

View solution in original post

10 REPLIES 10
danextian
Super User
Super User

Hi @jtooke 

This will require a disconnected table and another measure referencencing such. There are only two levels in the hierarchy below but notice that whenever a district is selected (level 1), the column chart automatically shows all schools within that district within the need to drilldown.

danextian_0-1767960345161.gif

 

Please see the attached pbix.





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.

@danextian This is great, thank you so much! This is exactly what I needed.

Kedar_Pande
Super User
Super User

@jtooke 

 

Yes. Field Parameter + Level measure.

Field Parameter: Region → SubRegion → Country hierarchy slicer.

 

Measures:

Level = SWITCH(TRUE(),  HASONEVALUE(Region), 1,  HASONEVALUE(SubRegion), 2,  3)

 

Children = VAR L = [Level]
RETURN SWITCH(L, 1, Region = SELECTEDVALUE(Region),
2, SubRegion = SELECTEDVALUE(SubRegion),
TRUE())

 

Visual filter: [Children] = TRUE

 

If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

lbendlin
Super User
Super User

In hierarchical visuals you can choose between Expand (showing the next level in addition to the current level) and drilldown (replacing the level with the next level).  

 

lbendlin_0-1767906577942.pnglbendlin_1-1767906604053.png

 

 

 

Thanks @lbendlin - maybe I can clarify what I am looking for. I am looking to avoid the need for a user to drilldown at all - for instance in my Region - SubRegion - Country hierarchy slicer, when a user selects something from Region, I want the visualization to automatically update to show SubRegions under that Region. When a user selects a SubRegion in the slicer, i want the visualization to automatically update to show Countries under that SubRegion. And the visualization's default view should show the Region. 

when they make a selection

That is not something you can reliably probe.  Remember that in Power BI "nothing selected"  is the same as "everything selected"  and that you also need to distinguish between "selected","filtered", and "highlighted".

 

Educating your users on how to use these arrows is the better option in my opinion.

Amar_Kumar
Super User
Super User

@jtooke Not automatically with a hierarchy slicer.
But it is possible with a simple workaround.

 

  • Create 3 separate slicers: Region, SubRegion, Country

  • Use Country in your visuals

  • Selecting:

    • Region - shows all SubRegions/Countries under it

    • SubRegion - shows all Countries under it

    • Country - shows only that Country
      No DAX needed, works as expected.

Thanks @Amar_Kumar . Unfortunately this isn't quite what I need since I still need the Regional/SubRegional aggregation, where the default view should show each region, and when i select one region it should show the sub-regions for only that region. The countries should only show when one SubRegion is selected.

@jtooke 

What you’re trying to do can’t be handled by slicers alone. Slicers only filter data; they don’t control which level of a hierarchy a visual should display.

The usual way to solve this is to let the visual decide the level based on what’s selected.

Set your visual up with the full hierarchy on the axis:
Region - SubRegion - Country
(do not use drill down)

Then create a small helper measure like this:

Show Level = IF(HASONEVALUE(Geo[SubRegion]) || HASONEVALUE(Geo[Region]),1,1)

 

Use your normal value measure for the visual, and add Show Level to the visual-level filters set to “is not blank”.

Behavior:

  • No selection - visual shows Regions

  • One Region selected -visual shows SubRegions for that Region

  • One SubRegion selected - visual shows Countries

  • Multiple Regions selected - stays at Region level

This keeps regional totals by default and naturally drills down based on the slicer selection, without users needing to click drill buttons.

Thanks @Amar_Kumar ! I'm not sure i fully understand, I have my Region-SubRegion-Country hierarchy as the Values for my slicer, and the X-axis for my visualization with that measure created and added to the visualization filters. However, when I select anything from the slicer it doesn't alter the behavior at all

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.