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
flaviotti
Helper I
Helper I

Dynamically add or remove items presented on a slicer

Hello,

I am trying to reduce the number of items listed on a slicer. The slicer is listing all 210 countries in the world. 
The slicer doesn't offer type-in functionality, and I would rather avoid the consumers of the report to have to scroll this number of items for their multiple selection choices. The selections will be then used to make comparison against the drillthrough single country selected in the previous page.

I thought to use a fill map from where the user would click the countries, and have the slicer presenting only the country selected. 
Assume I have a table 'Comparing Countries'[country code] I use to fill the map, my question is: how can I make the slicer only present the countries selected?

 

When I try to create a table based on values('Comparing Countries'[country code]), it somehow lists all 210 countries regardless the selection. Although, if I use that expression in a measures, like countrows(values('Comparing Countries'[country code]) it returns the true number of countries being selected, as I would expect. 
So, I conclude that creating tables won't take in account context, even if I use allselected. So is there a way I could pass to a slicer a virtual table?

I hope the problem is not too confusing. Any help is immensily valuable.

Thank you, 
/Flavio

1 ACCEPTED SOLUTION
mussaenda
Super User
Super User

Hi @flaviotti,

 

Have you tried the chiclet slicer?

it allows filter when you select from the map.

 

 

Hope this helps!

View solution in original post

2 REPLIES 2
mussaenda
Super User
Super User

Hi @flaviotti,

 

Have you tried the chiclet slicer?

it allows filter when you select from the map.

 

 

Hope this helps!

Hi @mussaenda 

Fantastic! It looks this will solve my need!
Thank you so much for the fast and valuable answer.

 

Regards,

/Flavio

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.