Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Only show relevant values in a slicer?



I'm a newcomer to Power BI Desktop, having recently dipped my toe having previously done some basic work with Power Query. Most of that previous activity involved using Power Query primarily to load and trandform data, and the migration to using the data model and relationships is giving me some new options and challenges, as previously I was sticking with merging tables and using them in Excel. Here's a good example of a struggle I'm having...



So lets say I have a table consisting of restaurant dishes - this contains an ID, and then a bunch of information such as country of origin, calories, ingredients etc.


I then have a second table showing sales from a restaurant - that might include a unique order reference, as well as the recipe code, allowing it to be linked to the previous table - all easy so far.


So now I create a matix visualisation to present the sales data. I add some slicers to the sheet to let me filter the data as I want, and one of the slicers is for country or origin.


If I had merged the tables together and built my matrix from the resulting table, the slicer would only show me the relevant countries i.e. those that were actually represented in the orders list. However by building off the source tables through a relationship, I'm seeing every country listed that's in that recipes table. I can see why it would do that by default, but is there a way to only show the values in the that match a value in both tables?


This is obviously a made up example, but its coming up in a few areas so hopefully makes sense. Thanks in advance for any advice.

Regular Visitor

Having done some further research, I found this solution:


Its well explained so hopefully useful to others as seems like a fairly common requirement. 

View solution in original post

Community Champion
Community Champion

Hi @Nuuki


This is possible.Similar question has been answered here. I hope this will help you.






Thanks for the reply. I've taken a look at the solution you linked to and I'm not sure quite how it applies. 


I'm trying to filter the slicer, which is based on a column in table A, to only show values that are relevant to the data in a table B, which is linked. The solution seems to show how to filter a slicer based on some pre-defined values, but I don't see how it takes into account the data in the table.


What am I missing?

Regular Visitor

Having done some further research, I found this solution:


Its well explained so hopefully useful to others as seems like a fairly common requirement. 

Not applicable

Not sure if anyone will read this or not, but in the meantime it has become very easy to fix this using a filter on the slicer, adding the relevant value and saying "is not blank".



Helpful resources


2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.