cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors