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
okiedokie2017
Helper I
Helper I

Partial Match from 2 tables

Hello, 

 

I have 2 tables which I'm looking to match 2 columns. 

 

in Table 1, I have: 

 

Name: 

ABC 12345

CBR ghdks 3313

GBRHLLJ gjfjd (45653) 

 

in Table 2, I have

ABC

CBR

GBRHLLJ gjfjid 

 

How can I match these 2 columns together for partial match? 

Many thanks 

1 ACCEPTED SOLUTION

Hi,

 

Try these calculated column formulas in Table1

 

Group=FIRSTNONBLANK(FILTER(VALUES(Table2[Name]),SEARCH(Table2[Name],Table1[Name],1,0)),1)
Result=if(ISBLANK(Table1[Group]),"No","Yes")

Here's a screenshot

 

Untitled.png

 

Hope this helps.


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

View solution in original post

10 REPLIES 10
Ashish_Mathur
Super User
Super User

Hi,

 

What result are you expecting?  Please paste data in a Table format so it can clearly be interpreted.


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

Hello, 

 

I was looking to create 2 new columns in table 2, one column that shows the full name from table 1, and one column that states whether it was a match or not. 

 

 

in Table 1, I have: 

Name: 

ABC 12345

CBR ghdks 3313

GBRHLLJ gjfjd (45653) 

 

in Table 2, I have

 

Name                  MatchColumn 1                    MatchColumn 2

ABC                      ABC 12345                            Yes

CBR                      CBR ghdks 3313                     Yes      

GBRHLLJ gjfjid     GBRHLLJ gjfjd (45653)            No 

Hi,

 

Sorry, i will not be able to help.  I just do not understand your requirement.


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

Hi, 

 

What is it that you dont understand? I can clarify it for you 

 

Basically I have 2 tables with 2 name columns, these 2 columns were written differently so I cant just do a normal lookup for it. Was trying to match these 2 columns with partial texts 

Hi,

 

Keeping Table1 as a base, i can bring over data from Table2 into Table1.  Also, why is there a No for the last entry?


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

Hi, 

 

Yes that is correct. Oh sorry about it, that was a typo. Cuz in table 2 it has many more names that table 1 doesnt have, so I would like to see "No" in those rows. 

 

But for the example above,  it is a "Yes" for all 3

Hi,

 

Try these calculated column formulas in Table1

 

Group=FIRSTNONBLANK(FILTER(VALUES(Table2[Name]),SEARCH(Table2[Name],Table1[Name],1,0)),1)
Result=if(ISBLANK(Table1[Group]),"No","Yes")

Here's a screenshot

 

Untitled.png

 

Hope this helps.


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

Hi, 

 

Thanks so much for your help. Much appreciated. They worked!!!

 

I was wondering if I can do the same for table 2 instead? Meaning I add the calculate columns to table 2 (the one with the shorter names) rather than table 1? 

 

 

Many thanks 

Hi,

 

I don't think that is possible.  If my reply helped, please mark it as Answer.


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

I see, 

 

I was looking to get the calculated columns in Table 2 instead of table 1 as I was looking to create some dashboards based on it. 

 

 

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.