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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pkopi
New Member

Search by a list of Keywords

Hello, I'm new here. I've spent some time to find an existing topic that suits my need. However I was not successful.

So I'd be grateful if you could help with following case for Power BI (kind of) "vlookup" search.

In table A I have a column with txt data collected from 7 different txt files.

My task is to figure out in which of these txt files I can find key words listed in the table B.

It's important to make sure that some key words may be part of other biger words …. Example "MAN" is part of word "Manufacturing" (I'd like to exclude such cases in my results).

From the other hand I would NOT like to exclude my Rolls Royce case …because here I see complete word matching (see below)

Do you have any idea how to code it? I'm a beginner for PowerBI/DAX/Power Query ...but willing to learn. 

Input data:

TableA 
  
Txt_FileID    ClmnA1_TextData
1Aeorplane fast
2Germany south
3Manufacturing
4Poland 
5Motor
6Man 
7New Rolls Royce

 

TableB
 
ClmnB1_Keyword
Man
Turing
Motor
Rolls Royce

 

 

Output Data:

Table A
   
Txt_FileID    ClmnA1_TextData    ClmnA2_Matched
1Aeorplane fastNot found in Table B
2Germany SouthNot found in Table B
3ManufacturingNot found in Table B
4Poland Not found in Table B
5MotorMotor
6Man Man
7New Rolls RoyceRolls Royce

 

 

One more thing: I found one topic titled " SEARCH FUNCTION WITH A LIST VALUE " that one would work If I had "Paulina" in the Name table and "Paul" in the Keyword Table.    Note word "Paul" is part of the word "Paulina"  .... but the difference can be surprising 😉 

Thanks in advance

 

1 REPLY 1
amitchandak
Super User
Super User

@pkopi , Try a new column in tableA

 

col =

var _1 = maxx(filter(TableB, Search(TableB[ClmnB1_Keyword],TableA[ClmnA1_TextData],,0)>0),TableB[ClmnB1_Keyword])

return

if(isblank(_1) , "Not found in Table B", _1)

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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