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
Anonymous
Not applicable

Filter a visual by non selected Slicer

Hi,

 

Currently I have a report that has a table that lists all the clients we have.

 

The slicer I am using is just a list of our clients.

 

What I want to do is filter the table to show all the clients that are in the same industry as the one selected in the slicer.

 

The client table has industry 

 

Then once this is done only show the top 10 sales figures for the industry.

 

Currently the table will only filter and show the client selected in the slicer unless I disconnect them and then all data is shown.

 

Can anyone help me filter the table by industry and not client

 

Thank you

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @BIDrone,

 

Please check followings steps as below:

1. Create measure:

    TOPN = RANKX(ALL('Table'[client]),[Measure])

    Measure = SUM('Table'[sales ])

    Measure 2 =

    VAR sv =

        SELECTEDVALUE ( 'Table 2'[client] )

    VAR ind =

        CALCULATE (

            MAX ( 'Table'[industry ] ),

            FILTER ( ALL ( 'Table' ), 'Table'[client] = sv )

        )

    RETURN

        IF ( MAX ( 'Table'[industry ] ) = ind && [TOPN] < 4, 1, BLANK () )

2. Add measure 2 to filter:

1.PNG

3. Result would be shown as below:

2.PNG

3.PNG

4.PNG

BTW, Pbix as attached. Hopefully works for you.

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Hi Jay

 

Thank you for coming back to me.

 

Unfortuantley the code doesnt work I still get 1's next to the client whether it is in the same industry or not.

 

I have opend your PBIX file but it doesnt contain the code in it.

 

I'll keep trying with the code.

 

Thank you again

Hi @Anonymous ,

 

Please check this pbix again.

Otherwise, please share your sample data to me if you don't have any Confidential Information.

Please let me know if i can help.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

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.