How to add Search to a Slicer
Sometimes, you’ll have a large list of items in a slicer, and you’ll wish you had the ability to search them.
The good news is you CAN give your slicers a search bar, but only sometimes.
Let’s learn how and when.
We’ll use a simple Power BI report to demonstrate how to add Search to a Slicer.
The video below (and the written instructions below) use a simple Power BI file with one simple table. If you’d like to download a copy of it to use yourself, you can download it here.
If you’d like to use the same data that I do in the below video, here is the data file you can connect to Power BI Desktop:
Video:
Our report here is super simple. We have a bar chart that shows participants by Region from our small simple dataset, and we have 2 slicers to the left. One for Program and one for Participant ID.
We only have a few programs in our Program Slicer, but if we did have a lot in there, and wanted an easier way for our users to find a particular program, we can turn on a search feature.
To turn on the search feature, we need to click the 3 ellipses dots in the upper right of the slicer (they appear when you hover over it with your mouse).
The very first option in that menu is “Search”:
Click that, and then when you open up your Program Slicer dropdown, you’ll see a little search bar.
Your users can start typing what they are looking for and the slicer will show them options that match what they have typed (even if it’s just a few letters).
So, that’s GREAT.
But, there’s a big problem with this search feature. It works GREAT on slicers with text fields, but ISN’T even an option on slicers with numerical fields.
If you have a visual, or a report page, or an entire report that you need to filter by a number, you’re out of luck.
If we click the 3 ellipses dots on the Participant ID Slicer, which uses the numeric Participant ID field, we do NOT get the Search option.
This is really annoying.
You may need to slice a visual, a report page, or even a whole report by some kind of numerical identifier. It could be a Participant ID like in our case, or maybe a Region ID, or a Product ID.
I *know* that the people at Microsoft who made this decision to implement search on some kinds of slicers and NOT others would make the argument that slicing using a number should be unnecessary (after all, we could probably use a Participant Name, Product Name or Region Name field), but by restricting the functionality of this feature, they are limiting everyone for no good reason.
Maybe the data we’re using does NOT have Participant Names (like ours doesn’t) for reasons of privacy and confidentiality.
Just because a use case for using a numerical field in a slicer isn’t immediately obvious, that’s no reason to limit the functionality of a visual element.
Let me know in the comments below if you have questions about implementing the search feature in a Slicer (or if you just want to hear me rant more about Microsoft people being short-sighted). :)
Take care,
Joe.
Post Tags: Slicers | Filters | View all Post Tags
Contact Joe | TraversData.com | People-Friendly Power BI | LinkedIn
This post was made with the Aug 2024 version of Power BI Desktop.