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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
vishal0soni
Advocate III
Advocate III

Filter / Display rows based on substring present within a slicer

I have a list of items (Apple, Bat, Cherry, Dog, and Elephant).

One or more of these items may or may not appear in the list of multiple comma-separated keywords (Apple, Cherry, Elephant).

What i need to do is to filter out the list of rows having only the selected keyword. So if I select the item "Apple", it should display only the rows having this keyword.

I am able to find out the rows having this item, but not able to display only the identified rows.Slicers for comma-separated valuesSlicers for comma-separated values

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here, when i click "Apple" in slicer, it shall display only the rows having Apple keyword in the next table.

2 ACCEPTED SOLUTIONS
vishal0soni
Advocate III
Advocate III

I think I got the easiest way of doing this just by using SEARCH function.

We can write this measure:

Exists = SEARCH(

    SELECTEDVALUE('Products'[Product]),

    SELECTEDVALUE(Solution_Products[SolutionProducts]),

    ,-1)
 
And then use this as a filter criterion for displaying the values. 
It works perfectly fine as desired. 
SlicerforKeywords_Solution.png
 
 

View solution in original post

@Ritaf1983 I got it. Used SEARCH function in a measure, and then used that in the filter. 

View solution in original post

7 REPLIES 7
vishal0soni
Advocate III
Advocate III

I think I got the easiest way of doing this just by using SEARCH function.

We can write this measure:

Exists = SEARCH(

    SELECTEDVALUE('Products'[Product]),

    SELECTEDVALUE(Solution_Products[SolutionProducts]),

    ,-1)
 
And then use this as a filter criterion for displaying the values. 
It works perfectly fine as desired. 
SlicerforKeywords_Solution.png
 
 
Ritaf1983
Super User
Super User

Hi @vishal0soni 

Please refer to the linked tutorial of @amitchandak :

https://www.youtube.com/watch?v=MKKWeOqFG4c

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks @Ritaf1983 

This looks good and promising. However, there is a challenge, the list of keywords is huge (hundreds of books), and each row has large number of keywords (all nouns in a book).  So making a duplicate column, and then normalizing that entire table would result in huge list I believe.

@vishal0soni Unfortunately I don't think we have another kind of solution, that's necessary to make the relationship...same logic as lookup.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Can we make use of string functions like FIND or SEARCH dynamically to obtain the desired results on the fly?

@vishal0soni I don't see how it can work with the slicers...
but you can try to play with it...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

@Ritaf1983 I got it. Used SEARCH function in a measure, and then used that in the filter. 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.