Forum Discussion
Error message when expanding second table in merge: "The 'offset' argument is out of range"
- 9 months ago
Thank you Shubham_rai955 and PhilipTreacy for your suggestions. I've finally figured out the problem, and I think it is effectively an example that falls within the suggestions you've both made: the matching identifier being used, ISSN number, is often used in the format '1234-5678', which was the case in both of the tables here. Removing the hyphens from the ISSNs in both tables --> a nice obedient merge using the '12345678' identifiers. Phew! Thanks again.
This error usually happens because Power Query is getting confused with the data in one or both of your tables during the merge and expand step. Common causes include mismatched data types between join columns or problems related to query folding and data refreshing.
Solution can be:
Make sure that the columns used to merge the tables have the same data type (e.g. both text or both number).
Before the merge, add a step with Table.Buffer() to your source table in Advanced Editor. This can stop Power Query from reorganizing (folding) the steps and helps avoid "offset out of range" errors.
Remove any empty, error, or null rows in the columns you use for joining, if possible.
Try these steps and your table expansion should work without this error. If you still see the error, check for hidden or special characters in your data sources.
Thank you Shubham_rai955 and PhilipTreacy for your suggestions. I've finally figured out the problem, and I think it is effectively an example that falls within the suggestions you've both made: the matching identifier being used, ISSN number, is often used in the format '1234-5678', which was the case in both of the tables here. Removing the hyphens from the ISSNs in both tables --> a nice obedient merge using the '12345678' identifiers. Phew! Thanks again.