Forum Discussion

Centaur's avatar
Centaur
Icon for Helper V rankHelper V
4 years ago
Solved

Check for Misspellings on Co Name

Hello, is there a check in PQ to see if there are co names that somone typed incorrectly?

For example:

Goodyear

Goodyear

Good year  (there is a space here)

Acme LLC

Acme LLC

Acme  (missing the LLC)

 

Is there some way to check?

I would want to change all entries to be consistent

 

thank you

  • Hi Centaur ,

     

    A few possible options:

     

    1) Have a list of properly formed company names and merge it to your table using fuzzy match logic. *NB* This is by no means infallible.

    2) Have a list as before, but merge it without fuzzy logic. This will leave blanks in the joined column to identify were misspelling occurs. *NB* This doesn't automatically correct the problem, just quickly identifies where there is a problem.

    3) Use the point 2 process to identify misspelling, then apply each different version to a Replace Text step, replacing the incorrect spelling with the correct one. *NB* This can be time-consuming and is entirely reactive, not proactive.

    4) Use entry validation in your source. In Excel, this is as easy as only allowing selection of a company from a dropdown populated by a protected list. *NB* If you're not using Excel, you may need to see what similar functions your actual source system can provide.

     

    Unfortunately, unless you're using properly defined company ID's and company names, there's no real way for Power Query to know intuitively that Acme should actually be Acme LLC. It can't really make that leap. Fuzzy join logic would be as close as you get to some kind of 'this is similar to...' evaluation, but this comes with its own risks, as I'm sure you can imagine.

     

    Pete

2 Replies

  • Hi Centaur ,

     

    A few possible options:

     

    1) Have a list of properly formed company names and merge it to your table using fuzzy match logic. *NB* This is by no means infallible.

    2) Have a list as before, but merge it without fuzzy logic. This will leave blanks in the joined column to identify were misspelling occurs. *NB* This doesn't automatically correct the problem, just quickly identifies where there is a problem.

    3) Use the point 2 process to identify misspelling, then apply each different version to a Replace Text step, replacing the incorrect spelling with the correct one. *NB* This can be time-consuming and is entirely reactive, not proactive.

    4) Use entry validation in your source. In Excel, this is as easy as only allowing selection of a company from a dropdown populated by a protected list. *NB* If you're not using Excel, you may need to see what similar functions your actual source system can provide.

     

    Unfortunately, unless you're using properly defined company ID's and company names, there's no real way for Power Query to know intuitively that Acme should actually be Acme LLC. It can't really make that leap. Fuzzy join logic would be as close as you get to some kind of 'this is similar to...' evaluation, but this comes with its own risks, as I'm sure you can imagine.

     

    Pete

    • Centaur's avatar
      Centaur
      Icon for Helper V rankHelper V

      thank you Pete,  I thought it would be a simpler solution.  Thought I would ask.  thank you.