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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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


Follow on LinkedIn
@ 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!:
The Definitive Guide to Power Query (M)

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


Follow on LinkedIn
@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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