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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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
Impactful Individual
Impactful Individual

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.