In Microsofts Power Query, I'm trying to Merge (i.e. Join) two sources, and I'm getting a mysterious error.
I have a source file which is a large csv data dump. I read it in and clean it, unpivot some data, and load it as a Connection-only. Here's a preview of the Connection-Only:
The second source is a 1 column table. Here's its Preview:
Finally, I'm merging them, with this code, and getting this error:
I get the same error using Table.Join. I've tried changing the order of the two tables to the join, but no joy.
Oddly, everything works fine while I'm in the query-editor. It's only when I Load and Close that I hit the error.
Any idea what's causing it? Alternatively, any workarounds?
My hypothesis is that one of the values in the CSV file has a comma in the Part No
, which makes it think that number spans two columns and you're left with an extra column.
The reason it works in the query editor but not when you close and load is probably because the editor only loads a preview of the rows and the error occurs not in the previewed section.
You might be able to resolve the issue by filtering out that one row with a comma in it (assuming my hypothesis is correct). Another option would be to load it as a text file and try splitting the columns in the query editor instead of relying on the CSV import to automatically handle it correctly.