cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jeffery24 Regular Visitor
Regular Visitor

Dynamic slicer based on drop down list

Hi,

 

I am new to Power BI and was wondering if it is possible to create a dynamic slicer based a drop down menu.

Reason being is that I am running out of dashboard space when adding slicers.

The slicer selection in the options would determine the control for the main slicers.

 

 

Capture.JPGCapture2.JPG 

 

 

 

 

 

 

 

 

 

 

I have done something similar with a dynamic measure but that was adding values to a graph.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Re: Dynamic slicer based on drop down list

Slicer wise I think you could achieve that with table grouping the 2 dimensions

 

Slicer One OptionsSlicer One
CarrierA
CarrierB
CarrierC
POLChina
POLPakistan
POLSpain
PODAustralia
PODNZ
PODRwanda

the issue is that most likely you will need to pass the filter from the slicer manually to the measures - unless you could pass the joins in a way to propagete filters to multiple columns

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Microsoft v-jiascu-msft
Microsoft

Re: Dynamic slicer based on drop down list

Hi @Jeffery24,

 

Yes, when we select options in one slicer the other one will be filtered if these two fields have connections. It seems what you need. What's the issue? Can you share a sample?

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jeffery24 Regular Visitor
Regular Visitor

Re: Dynamic slicer based on drop down list

Hi Dale,

 

Thanks for reply.

I can't share the dashboard due to our companys data policy but will try to explain what I want to achieve.

 

I have 2 tables one main table containing freight movement data i.e. a container coming from China to Germany containing 5,000 pcs and 60 cubic metres etc. The table"SP Data" contains different headers e.g. POL (origin port) / POD (destination port) / Carrier (company who owns the container ships). The data file could contain from 500 to 5000 rows dependant on customer report

--tried to attach a screen print but is different option then when posting!----

 

Currently for each  header I have a slicer that lists all the aggregated POLs / PODs / Carriers. The customer has asked for more headers to be used as slicers to drill into the data. This is fine but eats up dashboard space/

 

My thoughts were to use a measure and a seperated static table called "Table"  listing the names POL / POD / Carrier under and "options" field.

Then use the switch option to change the slicer source dynamically.

 

The code is not expected to work but I wondered if there was a string equivalent of the below to allow the output the Table to be the source of "Slicer One" which could dynamically populate the slicer based on the users choice. Hope this makes sense.

Thanks.

 

 Slicer One =
IF(HASONEVALUE( 'Table'[Report][Option]), SWITCH(VALUES( 'Table'[Report][Option]), "POL", GROUPBY( 'SP DATA'[POL]), "POD", groupby( 'SP DATA'[POL]), "Carrier", groupby( 'SP DATA'[Carrier])), "Missing")
Super User II
Super User II

Re: Dynamic slicer based on drop down list

Slicer wise I think you could achieve that with table grouping the 2 dimensions

 

Slicer One OptionsSlicer One
CarrierA
CarrierB
CarrierC
POLChina
POLPakistan
POLSpain
PODAustralia
PODNZ
PODRwanda

the issue is that most likely you will need to pass the filter from the slicer manually to the measures - unless you could pass the joins in a way to propagete filters to multiple columns

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

View solution in original post

Jeffery24 Regular Visitor
Regular Visitor

Re: Dynamic slicer based on drop down list

Hi Stachu,

 

Thanks for the idea will give that a go.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors