Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Afiq_Danial
Helper II
Helper II

How to remove some options in slicer?

Hi everyone, 

 

I have a problem that I am facing right now. I have a table which shows like this: 

 

Afiq_Danial_0-1668958619391.png

 

I want to create a slicer that can filter my table by the certifcation the staffs has. I have a slicer that looks like this right now:

Afiq_Danial_1-1668958769806.png

Right now, when i choose A, it will only show Henry. 

 

I want my slicer to look like this: 

Afiq_Danial_2-1668959000860.png

If i were to choose A, I want my table to show everyone who has the certificate A, which means in my case, it should be able to show John, Henry, Brian.

 

Thank you! Appreciate any help i can get.

1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @Afiq_Danial ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669194288968.png

Table(2):

vbinbinyumsft_1-1669194305128.png

2. create a measure with below dax formula

Measure =
VAR cur_select =
    SELECTEDVALUE ( 'Table (2)'[Column1] )
VAR cur_cert =
    SELECTEDVALUE ( 'Table'[Certification] )
RETURN
    IF ( CONTAINSSTRING ( cur_cert, cur_select ), 1 )

3. add a slicer with Table(2) field and add a table visual with Table fields, add measure to table visual filter pane

vbinbinyumsft_2-1669194444583.png

 

Animation18.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @Afiq_Danial ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669194288968.png

Table(2):

vbinbinyumsft_1-1669194305128.png

2. create a measure with below dax formula

Measure =
VAR cur_select =
    SELECTEDVALUE ( 'Table (2)'[Column1] )
VAR cur_cert =
    SELECTEDVALUE ( 'Table'[Certification] )
RETURN
    IF ( CONTAINSSTRING ( cur_cert, cur_select ), 1 )

3. add a slicer with Table(2) field and add a table visual with Table fields, add measure to table visual filter pane

vbinbinyumsft_2-1669194444583.png

 

Animation18.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@Afiq_Danial Easiest way would be to split your column in Power Query and unpivot the columns. Otherwise, you could use a disconnected table for you slicer and a Complex Selector where you use SEARCH. The Complex Selector - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.