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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Lookup text from unrelated tables

Hello there,

 

Am trying to overcome this issue where I want to compare 2 texts (Names) from 2 different unrelated tables tables.

 

While applying all DAX seen in similar post, I couldn't find see tables names present when "SEARCH" function was applied.

 

I posted some images to help you understand how both tables looks:

 

Mobafa_0-1666315360544.png

 

Names are removed here; however the goal is to creat a new column in the Left table called "Match", with "X" in case Name is matched with Name in the Right table (Finance FTE).

 

Your support & help is much appreciated.

 

Thank you,

Mobafa

 

 

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

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated column.

Column =
IF(
    'Name List FTE'[Name] in SELECTCOLUMNS('Finance FTE',"1",[Name]),"X",BLANK())

2. Result:

vyangliumsft_0-1666603666303.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

Here are the steps you can follow:

1. Create calculated column.

Column =
IF(
    'Name List FTE'[Name] in SELECTCOLUMNS('Finance FTE',"1",[Name]),"X",BLANK())

2. Result:

vyangliumsft_0-1666603666303.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

Anonymous
Not applicable

Hi @v-yangliu-msft ,

 

Thank you for your response.

 

The method you provided work partially and I guess it's because of Exact match problem.

 

Is there a way in DAX the I could perform a query such as a fuzzy match i.e.(approximate)?

 

Thanks again,

Mobafa

 

I have an issue where the table 

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in the left table

Match = if(calculate(countrows(lefttable),filter(righttable,righttable[Name]=earlier(lefttable[name])))>0,"X",blank())

Hope this helps.


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

@Anonymous , Assume I want to search a part of text from Table 1 to Table 2

New column in table 2

New columm=

var _cnt = countx(filter(Table2, search(Table1[Column], Table2[Column],,0) >0) , Table2[Column])

return

if(isblank(_cnt), "Not Found", "Found")

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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