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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gvenkatesh482
Frequent Visitor

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 @gvenkatesh482 

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










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


Proud to be a Super User!









"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 @gvenkatesh482 

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










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


Proud to be a Super User!









"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.

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors