Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Help on fuzzy matching

Hello!

 

Could someone assist me in matching names between two tables?

 

I have two tables: "Client Name" and "Employee Name." My goal is to create a new column in the "Client Name" table that identifies whether a client is an employee or not based on the "Employee Name" table.

 

The structure of names in the "Client Name" table is not standardized. Some names follow various formats:

1. John A. Dela Cruz
2. Dela Cruz, John A.
3. John Dela Cruz
4. Dela Cruz, John
5. John Angeles Dela Cruz
6. Dela Cruz, John Angeles

 

Meanwhile, names in the "Employee Name" table follow these formats:

1. Dela Cruz, John Angeles
2. Dela Cruz, John A.
3. Dela Cruz, John

 

Given the variability in naming conventions between the two datasets, the six sample names in the "Client Name" table should be labeled as employees since there is a match in the "Employee Name" table. 

 

For your reference, please refer to the link below for the sample file.

Sample File For Matching.pbix

 

Thank you and best regards.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Below is my table1:

    Below is my table2:

    Then you can use fuzzy match:

    The final output is shown in the following figure:

    After filter:

    The following DAX might work for you:

    Column = IF('Table'[Table (2).Employee Name] = RELATED('Table (2)'[Employee Name]),"Empolyee",BLANK())

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Below is my table1:

    Below is my table2:

    Then you can use fuzzy match:

    The final output is shown in the following figure:

    After filter:

    The following DAX might work for you:

    Column = IF('Table'[Table (2).Employee Name] = RELATED('Table (2)'[Employee Name]),"Empolyee",BLANK())

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.