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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
mr_yogi
Frequent Visitor

Master - Slave Filter/ Slicer in Power BI

Hi,

 

I have a multi-page dashboard which compares metrics across 6 countries, with about half the pages comparing the 6 countries directly and the rest having a slicer to select 1 of the 6 in more detail. The limit of 6 countries was to keep the visualisations clean and readable.

 

I now need to incorporate more countries, however there is no need to compare more than 6 at a time, thus the easiest way I could think of would be to include a master slicer on the front page that allowed the user to select their chosen (up to 6) countries. Unfortunately, every attempt I’ve made hasn’t worked out.

 

Is this even possible? I can sync slicers, but not limit the available options for the secondary slicer based on the primary, I also thought about using measures to somehow populate the secondary slicer but can’t work out how to then connect that back to the data.

 

Thanks

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@mr_yogi Maybe create a disconnected table for your master slicer. Then create a measure that you use to filter your secondary slicers like:

Selector = 
  VAR __MasterCountries = SELECTCOLUMNS( 'MasterSlicer', "Country", [Country] )
  VAR __Country = MAX('CountrySlicer'[Country])
  VAR __Result = IF( __Country IN __MasterCountries, 1, 0)
RETURN
  __Result

Use the Filters pane to filter your secondary slicers where this measure = 1


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
mr_yogi
Frequent Visitor

Thanks so much that's great.

Greg_Deckler
Super User
Super User

@mr_yogi Maybe create a disconnected table for your master slicer. Then create a measure that you use to filter your secondary slicers like:

Selector = 
  VAR __MasterCountries = SELECTCOLUMNS( 'MasterSlicer', "Country", [Country] )
  VAR __Country = MAX('CountrySlicer'[Country])
  VAR __Result = IF( __Country IN __MasterCountries, 1, 0)
RETURN
  __Result

Use the Filters pane to filter your secondary slicers where this measure = 1


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.