cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
charleszino Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Hiding Slicer values based on values from another table

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

 

Highlighted
charleszino Frequent Visitor
Frequent Visitor

Re: Hiding Slicer values based on values from another table

@v-juanli-msft

 

Thank you... this worked perfectly!

2 REPLIES 2
Community Support Team
Community Support Team

Re: Hiding Slicer values based on values from another table

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

 

Highlighted
charleszino Frequent Visitor
Frequent Visitor

Re: Hiding Slicer values based on values from another table

@v-juanli-msft

 

Thank you... this worked perfectly!