Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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. 

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

3 Replies

  • edhans's avatar
    edhans
    Community Champion

    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.

  • Anonymous's avatar
    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.  

    • edhans's avatar
      edhans
      Community Champion

      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.