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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to compare 2 different columns and return a different column as an Output

Hi Community , 

 

There are 2 tables which are joined by Column ID . I want to compare each cell value of Complaint Reference in table A against all values of Table B and if there is a match ( no need to be exact match , but even if some part of the string matches)  , then I want to return ID column as an output from Table A . 

 

Table A 

 

Table A.png

 

Table B 

 

Table B.png

 

Please assist with the requirement . 

 

Thanks

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Anonymous 

There are multiple ways to achieve your desired result but you definitely cannot use a relationsip or LOOKUPVALUE as there is no exact match between the two columns in question. I have attached two sample pbix files - one uses power query, the other uses DAX (both calc column and measure)

I have atta





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @Anonymous 

There are multiple ways to achieve your desired result but you definitely cannot use a relationsip or LOOKUPVALUE as there is no exact match between the two columns in question. I have attached two sample pbix files - one uses power query, the other uses DAX (both calc column and measure)

I have atta





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Thank you @danextian  . I Will look into this solutions and try them. Appreciate your help . 

Helpful resources

Announcements
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 Solution Authors