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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymus_18
Frequent Visitor

Filter based on Column

I have a column with comma separated strings.I need to create a slicer for filter value that if I select any word I get all the rows having that word

 

For an example

Col1

Cricket,tennis

Cricket,football,tennis

Football,tennis, hockey

Hockey

Tennis,hockey

Cricket

Cricket,football

 

This is the column ,so if select cricket in a filter the matrix should show all the rows which have cricket

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymus_18 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1689577349441.png

Table2:

vbinbinyumsft_1-1689577366211.png

 

2. create a measure with below dax formula

Measure =
VAR a =
    SELECTEDVALUE ( 'Table 2'[Column1] )
VAR b =
    SELECTEDVALUE ( 'Table'[Column1] )
VAR c =
    IF ( CONTAINSSTRING ( b, a ), 1 )
RETURN
    IF ( NOT ( HASONEVALUE ( 'Table 2'[Column1] ) ), 1, c )

3. add a matrix visual with Table fields and add measure to it filter pane and set

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

Hi @Anonymus_18 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1689577349441.png

Table2:

vbinbinyumsft_1-1689577366211.png

 

2. create a measure with below dax formula

Measure =
VAR a =
    SELECTEDVALUE ( 'Table 2'[Column1] )
VAR b =
    SELECTEDVALUE ( 'Table'[Column1] )
VAR c =
    IF ( CONTAINSSTRING ( b, a ), 1 )
RETURN
    IF ( NOT ( HASONEVALUE ( 'Table 2'[Column1] ) ), 1, c )

3. add a matrix visual with Table fields and add measure to it filter pane and set

Animation14.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.

amitchandak
Super User
Super User

@Anonymus_18 , two way, One is split column by delimiter, second to have a dimension with splitter value

 

Power Query Split Column , Split Column By Delimiter: https://youtu.be/FyO9Vmhcfag

 

 

Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.