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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Pintobean80
Regular Visitor

Creating a slicer that searches for a word contained in a row

I have two tables in Power BI. Table 1 contains the following "Functions" column.

Pintobean80_0-1710897421642.png

Table 2 has all the Functions for the slicer (one word per row).

Pintobean80_1-1710897558160.png

I want to create a slicer using the column in Table 2 to that should let users select a single function and show all rows that "contain" that function. So if Data Analytics is selected, it should show the following two rows

Pintobean80_2-1710897673661.png

I tried creating a relationship between both columns: many to many and cross filter both, but nothing seems to work. When I selected a function in the slicer, everything vanishes. I have no idea how to make this work. Please help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Pintobean80 

You can refer to the following solution.

Sample data 

Table1

vxinruzhumsft_0-1711001301710.png

Tabke (2)

vxinruzhumsft_1-1711001318382.png

Create a measure

Measure = COUNTROWS(FILTER('Table (2)',CONTAINSSTRINGEXACT(MAX('Table'[Functions]),[FunctionsSlicer])))

Then put the measure to the visual filter.

vxinruzhumsft_2-1711001359581.png

Output

vxinruzhumsft_3-1711001376605.png

vxinruzhumsft_4-1711001397598.png

Best Regards!

Yolo Zhu

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

7 REPLIES 7
Anonymous
Not applicable

Hi @Pintobean80 

You can refer to the following solution.

Sample data 

Table1

vxinruzhumsft_0-1711001301710.png

Tabke (2)

vxinruzhumsft_1-1711001318382.png

Create a measure

Measure = COUNTROWS(FILTER('Table (2)',CONTAINSSTRINGEXACT(MAX('Table'[Functions]),[FunctionsSlicer])))

Then put the measure to the visual filter.

vxinruzhumsft_2-1711001359581.png

Output

vxinruzhumsft_3-1711001376605.png

vxinruzhumsft_4-1711001397598.png

Best Regards!

Yolo Zhu

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

 

 

 

PijushRoy
Super User
Super User

Hi @Pintobean80 

Create a relationship between two tables with Function column
Many to Many and Table 2 filter Table 1
Create a Slicer with a search option. Use the multi-select option. So users can search and select multiple value if needed

PijushRoy_0-1710900443959.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Unfortunately that doesn't work. I created the relationship as you said, and then created the slicer using the column in Table 2. I select anything, and the table just vanishes instead of showing the rows.

Please create a pbix containing sample data that still reflects your semantic model (tables, relationships, calculated columns, and measures). Upload the pbix to OneDrive, Google Drive, or Dropbox and share the link in this thread. If you are using a spreadsheet to create/import the sample data instead of the manual import method, share the spreadsheet.




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Here is a link to the sample. I tried again, and it seems to bring up only rows with that exact word but not the other rows that contain it.

 

https://docs.google.com/spreadsheets/d/1fnaecEMfCiSIxyHYmLm-vhhD79D7UdSr/edit?usp=sharing&ouid=10516...

Hi,

In the Query Editor, split the Functions column into rows using the ; delimiter.  Now create a relationship (Many to One and Single) from the Functions column of Table 1 to Table 2.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I tried that but on the table, I want to see all functions for the each row. I don't want multiple rows of San Antonio with one function each. I want the single row of San Antonio with all 3 functions it contains shown.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.