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

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

Reply
PBI_Lurin
Frequent Visitor

Search for a string using a keyword table

Hi,

I have a data table and a keyword table as shown in the picture.

I'd like to use an slicer with the Filter Category (from the Key Table) to get data from the first table. i.e. If a select "Section 10" in the slicer I will get  "10 Section XAW" & "10-sect INI".

PBI_Lurin_0-1626738961015.png

Originally I created a new column in the TABLE_DATA with IF and CONTAINSSTRING, but there is a large amount of Key Words that I need to manage.

Key Words Column =
if (CONTAINSSTRING(TABLE_DATA[Description],"10*Sect*"),"Section 10",
if(CONTAINSSTRING(TABLE_DATA[Description],"8*Sect*"), "Section 8", ....

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @PBI_Lurin 

 

It depends on what you want, if you need a column, and if you can use Power Query, go to add a column with a custom function to get your keyword column in your table_data; if you need to display the Description in a visual, then use a measure instead, I use the Filters pane to filter this test measure to "is not blank". 

Vera_33_0-1626744091075.png

test = 
VAR CurKeyword=SELECTEDVALUE(Table_Key[Keywords])
RETURN
IF(CONTAINSSTRING(MAX(Table_Data[Description]),CurKeyword),"")

 

View solution in original post

2 REPLIES 2
PBI_Lurin
Frequent Visitor

Sweet!

It'd be nice to be able to use this Measure as a filter for the whole page, anyway applying the filter manually to each visual is not a big deal for now.

Vera_33
Resident Rockstar
Resident Rockstar

Hi @PBI_Lurin 

 

It depends on what you want, if you need a column, and if you can use Power Query, go to add a column with a custom function to get your keyword column in your table_data; if you need to display the Description in a visual, then use a measure instead, I use the Filters pane to filter this test measure to "is not blank". 

Vera_33_0-1626744091075.png

test = 
VAR CurKeyword=SELECTEDVALUE(Table_Key[Keywords])
RETURN
IF(CONTAINSSTRING(MAX(Table_Data[Description]),CurKeyword),"")

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Kudoed Authors