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

View all the Fabric Data Days sessions on demand. View schedule

Reply
katari_123
Frequent Visitor

Is there a way to make a slicer switch between hierarchies based on another slicer's selected value?

Greetings! Hoping someone can help me with this.

 

Here's the scenario:

I have a slicer called "Type" with values being 1 and 0

From the same table, I created 2 hierarchies:

  • State Hierarchy: uses the fields "State", "City"
  • City Hierarchy: uses the fields "City", "Zip Code"

 

Now I have another slicer that I'd like to toggle hierarchies (or parameter) depending on what "Type" value is selected.

Is there an easy way to do something like following?

SWITCH ( Type,

0, State Hierarchy

1, City Hierarchy)

 

It's completely doable with single field names but I can't quite figure out how to use it with hierarchies. I tried using Field Parameters, but it has to use that Parameter itself as a toggle, whereas I need my "Type" value to trigger the switch.

 
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@katari_123 , I think this can be done using a bookmark. This Switch between columns, and where we can use slicer value.

Another one is to create a field parameter. If needed, duplicate the field with a different name. And then create a custom column for your hierarchy and then use that to switch hierarchy 

Check the attached file for both options- Last two pages 

amitchandak_0-1764645940727.png



AxisNew = {
    ("Brand", NAMEOF('Item'[Brand]), 0),
    ("Category", NAMEOF('Item'[Category]), 1),
    ("Sub Category", NAMEOF('Item'[Sub Category]), 2),
    ("Name", NAMEOF('Item'[Name]), 3),
    ("State", NAMEOF('Geography'[State]), 5),
    ("City", NAMEOF('Geography'[City]), 4),
     ("City G", NAMEOF('Geography'[City]), 6)
}


 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

One of ways is to create an additional column (and name it as "Type") in the field-parameter, something like below.

Jihwan_Kim_0-1764646436084.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

5 REPLIES 5
Kedar_Pande
Super User
Super User

@katari_123 

 

Use Field Parameters for the hierarchies and place that param slicer as toggle.

Use Bookmarks or Buttons to swap visuals showing different hierarchy slicers based on the "Type" slicer selection.

Create a disconnected table (Type values) + measures + layered visuals that show/hide based on selection.

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

One of ways is to create an additional column (and name it as "Type") in the field-parameter, something like below.

Jihwan_Kim_0-1764646436084.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks so much, this solution worked for me! The examples were really helpful. I was also able to create a relationship between the field parameter and table to filter the data, which was exactly what I was looking for 😊

amitchandak
Super User
Super User

@katari_123 , I think this can be done using a bookmark. This Switch between columns, and where we can use slicer value.

Another one is to create a field parameter. If needed, duplicate the field with a different name. And then create a custom column for your hierarchy and then use that to switch hierarchy 

Check the attached file for both options- Last two pages 

amitchandak_0-1764645940727.png



AxisNew = {
    ("Brand", NAMEOF('Item'[Brand]), 0),
    ("Category", NAMEOF('Item'[Category]), 1),
    ("Sub Category", NAMEOF('Item'[Sub Category]), 2),
    ("Name", NAMEOF('Item'[Name]), 3),
    ("State", NAMEOF('Geography'[State]), 5),
    ("City", NAMEOF('Geography'[City]), 4),
     ("City G", NAMEOF('Geography'[City]), 6)
}


 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks! The field parameter solution worked for me. Thanks for including examples, they're really helpful. I'll have to test out the bookmark approach next time.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.