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
Grella
Frequent Visitor

Hide values in a slicer when there is no data in a different table

I've searched through the threads and haven't come across exactly what i'm after, or perhaps i'm not understanding the solutions clearly to be able to apply to my scenario.

 

Among other tables, I have an employee table and a sales table with sales data from 2019 onwards. The employee table contains thousands of employees some of which have left the company prior to 2019 hence wouldn't have any sales. When i add a slicer using EmpID from the Employee Details table, i don't want to see EmpIDs of those that i know have left and wouldn't have any sales values against their name. 

 

Note as there are thousands of employees in the employee table, i'd be looking at removing about 60% of them from the slicer drop down so am looking for the easiest way to do this. Can i use a measure to apply as a filter?

 

What i have now:

Grella_2-1680079958846.png

 

What i want to have:

Grella_1-1680079892063.png

Sample File - Hide slicer values.pbix

Thanks in advance for any help!

 

2 REPLIES 2
DataInsights
Super User
Super User

@Grella,

 

This article explains how to use a measure as a visual filter for slicers:

 

https://www.sqlbi.com/articles/syncing-slicers-in-power-bi/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I am trying to apply:

Slicer_Manager =
    INT (
        NOT ISEMPTY ( Hire )
        ||
        NOT ISEMPTY ( Vacancy )
    )

 

however I am using a bridge table between 2 tables (Hire and Vacancy) and the bridge table has [Manager] field in it and I use this field in Manager Slicer. I do not want a mangers name to appear in the slicer IF the manager has no data on either the Hire or Vacancy table. 

 

Appreciate any help here!

Dawn

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.