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
NanduKris
New Member

Fuzzy matching

Hello guys,

Is there an option to prevent self matching while performing fuzzy matching in Power Query.  If we only need similarity check for values against other values, but not against same value itself.

Thanks

1 ACCEPTED SOLUTION
ajaybabuinturi
Memorable Member
Memorable Member

HI @NanduKris,

Yes, you can prevent self-matching while performing fuzzy matching in Power Query Editor by default, Power Query allows fuzzy matching, and it might compare the values against themselves but you can modify the process to avoid this.

Here is a simple approach to prevent self-matching:

  1. Add an Index Column:
    Before performing the fuzzy match, add an index column to your table. This will serve as a unique identifier for each row.
  2. Perform the Fuzzy Match:
    When you apply the fuzzy match, make sure you do it between two different queries/tables. In one of the queries, add the index column as a reference to ensure that you're not comparing values from the same row.
  3. Filter Out Self-Matches:
    After performing the fuzzy match, you can filter out any rows where the index of the matched value is the same as the index of the original row. This way, you will only keep the matches that are against different values.

Example Steps:

  1. Create Two Queries:
    Have your primary table and a duplicate table (or reference) for the matching process.
  2. Add an Index to Both Queries:
    Add an index column to both tables (or the same table, if you’re referencing it).
  3. Apply Fuzzy Matching:
    Perform the fuzzy match between the two tables/queries using the index column to ensure you’re comparing rows correctly.
  4. Remove Self-Matches:
    Filter out the rows where the index from the match table is the same as the index from the original table.

By doing this, you can ensure that Power Query Editor will not match a value to itself during fuzzy matching.

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

View solution in original post

3 REPLIES 3
v-hjannapu
Community Support
Community Support

Hi @NanduKris,

I would also take a moment to thank @ajaybabuinturi  , @ThomasWeppler  for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Regards,
Community Support team.

ajaybabuinturi
Memorable Member
Memorable Member

HI @NanduKris,

Yes, you can prevent self-matching while performing fuzzy matching in Power Query Editor by default, Power Query allows fuzzy matching, and it might compare the values against themselves but you can modify the process to avoid this.

Here is a simple approach to prevent self-matching:

  1. Add an Index Column:
    Before performing the fuzzy match, add an index column to your table. This will serve as a unique identifier for each row.
  2. Perform the Fuzzy Match:
    When you apply the fuzzy match, make sure you do it between two different queries/tables. In one of the queries, add the index column as a reference to ensure that you're not comparing values from the same row.
  3. Filter Out Self-Matches:
    After performing the fuzzy match, you can filter out any rows where the index of the matched value is the same as the index of the original row. This way, you will only keep the matches that are against different values.

Example Steps:

  1. Create Two Queries:
    Have your primary table and a duplicate table (or reference) for the matching process.
  2. Add an Index to Both Queries:
    Add an index column to both tables (or the same table, if you’re referencing it).
  3. Apply Fuzzy Matching:
    Perform the fuzzy match between the two tables/queries using the index column to ensure you’re comparing rows correctly.
  4. Remove Self-Matches:
    Filter out the rows where the index from the match table is the same as the index from the original table.

By doing this, you can ensure that Power Query Editor will not match a value to itself during fuzzy matching.

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

ThomasWeppler
Super User
Super User

Hey try this.

 

ThomasWeppler_3-1762334469234.png

 

 

ThomasWeppler_1-1762334341517.png

ThomasWeppler_2-1762334414754.png

 

If it helps than please accept the solution and give a kudos. 🙂

 

 

 

 

 

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