Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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".



Thats a great solution. Just to add more, make use of the "Filters on this visual" and add possibly the relationship column from the other table and make use of Advanced Filtering in Filter type and select "is not blank" or "is not empty".

I couldn't get this to work, i tried to add a field from the related table as a filter on the slicer visual, and i was not getting a filtered view. was i not doing it correctly?

possibly in that case, create a measure COUTROWS(tablename) and then add to the filter and set the filter as 'not blank'.

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors