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
charleszino
New Member

Hiding Slicer values based on values from another table

Hey all,

 

I am wondering if there is a way to hide values in a slicer that do not have corresponding data in another table.

 

Table A has a list of companies, and Table B has a list of office names.  In the data model, I have joined the 2 tables via the 'Company ID', and have edited the relationship between them to have "Cross Filter direction" set to 'Both' and "Apply security filter in both directions" is checked.

When I add a 'Slicer' visualization to my report, and want to show the 'Company Name' from Table A, it shows all companies in the table, and I'm trying to have the Slicer show just the companies that have a corresponding record in Table B.

It would seem simple enough to accomplish, and perhaps I am missing something obvious, but can't seem to get the desired result.

2 ACCEPTED SOLUTIONS
v-juanli-msft
Community Support
Community Support

Hi @charleszino

Assume the relationship between the two tables is

TableA (One) to TableB(Many)

Then create a calculated column in the TableB, you could use this column in the slicer which only contains the companies that have a corresponding record in Table B.

related = RELATED(TableA[company name]) 

1.png TableB                            2.png  TableA

 

Best Regards

Maggie

 

View solution in original post

@v-juanli-msft

 

Thank you... this worked perfectly!

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @charleszino

Assume the relationship between the two tables is

TableA (One) to TableB(Many)

Then create a calculated column in the TableB, you could use this column in the slicer which only contains the companies that have a corresponding record in Table B.

related = RELATED(TableA[company name]) 

1.png TableB                            2.png  TableA

 

Best Regards

Maggie

 

@v-juanli-msft

 

Thank you... this worked perfectly!

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.