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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ScORE
Helper I
Helper I

search text string in a column and see if it matches a value in a different tables column

I need help searcing searching a text string in a column to see if it matches a value in a different tables column.  The tables are not connected.  If the text string contains the value, I want to return another value into a new column.  Sample tables: 

 Table 1                                                                                             Table 2

Full NameCompany Comeidans on set Sets today
John StewartLaugh out loud John Stewart, Kevin Hart1
Terry FatorFunny Business Terry Fator, Ricky Gervais2
Larry DavidLaugh until your stomach hurts Larry David, Chevy Chase3
Gary ChandlerUS laughs Gary Chandler, Jay Leno4
Jim GaffinElectric comedy Jim Gaffin, David Letterman5
Dave ChappelleComedic Comedy Dave Chappelle, Adam Sandler6
Jerry SeinfeldFunny Guy Jerry Seinfeld, Vill Murray7

 

 

comedy.jpg

Basically, I want too search/look in the comedians on set column, for a match to one the names in my full names column and return the company in a column in the table with comedians on set as a value.  example:

 

seach comedians on set line 1 find john stewart as a match and return Laugh out loud as avalue in a new column in my comedians on set table.  

 

Your help is greatly appreciated!!!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@ScORE,

 

You may use DAX below to add a calculated column.

Column =
VAR d = ", "
RETURN
    CONCATENATEX (
        FILTER (
            Table1,
            SEARCH ( d & Table1[Full Name] & d, d & Table2[Comeidans on set] & d, 1, 0 )
                > 0
        ),
        Table1[Company],
        d
    )
Community Support Team _ Sam Zha
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

19 REPLIES 19

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.