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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jeffery24
Helper I
Helper I

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
Stachu
Community Champion
Community Champion

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 🙂

View solution in original post

4 REPLIES 4
v-jiascu-msft
Employee
Employee

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.

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")
Stachu
Community Champion
Community Champion

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 🙂

Hi Stachu,

 

Thanks for the idea will give that a go.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.