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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.

1 ACCEPTED SOLUTION
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

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.