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! Learn more

Reply
Anonymous
Not applicable

Compare text (names) in two columns in the same table

Hello

 

I want to compare the names in the column 1 and column 2 of the same table. Let's say 

 

   A                                   B

John Carry                    Carry John

Ivan Mathew Rode       Rode Evan Mathew

Bob Harry                     Bob Rive Harry

 

I have got these by fuzzy merging and these are already arranged by match. However, I want to write a custom column where If A = B get me the phone number of A else get me the phone number of B. There are no unique numerical IDs for these names. 

Any help is much appreciated. Thank you. 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Since the fuzzy join did the match for you, just use a formula like this:

if [column1] = [column2] then [column1 phone] else [column2 phone]

 This assumes you brought in both phone numbers from these two tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you @edhans  for your reply but that did not work. I tried it before and I forgot to mention it in the question. Although I found a solution in my case, I believe there should be a general solution for this problem.  

Not sure what you are proposing the general solution is to be. It would seem to me some AI would need to be invoked to read those names and do the comparison, and that isn't possible at that level right now. There is some AI functionality in Power BI Premium workspaces, but I've not played with it as of yet.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

Since the fuzzy join did the match for you, just use a formula like this:

if [column1] = [column2] then [column1 phone] else [column2 phone]

 This assumes you brought in both phone numbers from these two tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors