Forum Discussion
Dataflow: Traceback Invalid Cell Value Errors to Source
- 2 years ago
I was able to resolve this issue by inserting a temporary step after the folder of excel workbooks is loaded into the query, which filtered the workbooks down by name into batches (beginning with). Using this I was able to test batches of about 5-10 at a time, until I narrowed it down to the two files which were throwing the "#REF!" errors. I opened them up, cleared up the formulas generating the errors, and now the dataflow is working again.
When you say that "the second power query pulls data from a bunch of excel files in a folder", do you mean it uses the Transform & Combine folder connector? You can tell if this is the case as you will have an auto-generated folder of queries called "Helper Queries" or similar.
If so, then you should see a [Source.Name] column in the combined query (the final one where all the files get combined together, not a helper query) that will tell you exactly which file each row has come from. You may need to click back up the query step list a bit in case this column has been removed in subsequent steps but, once you find it, you can use it identify exactly where your errors have come from.
Pete
Thank you for your reply BA.Pete.
The query pulls yearly financial data from a folder full of excel documents using a custom function it seems. Below is the function (step) that is used to pull in this data. All of the preceding steps are getting to the folder location and removing unncessary files through transformations. After this step it is normal transformations cleaning up the data. Nothing appears wrong within the transformations, however when/if I try and 'load more' than the sample (1000) rows then the error data.format error '#REF!' appears. The problem is that the query does not tell me where the error is stemming from, which of the myriad of excel files that the query pulls from within the folder.
-------------------------------------------------------------------
- BA_Pete2 years agoSuper User
Ok. If you were using the standard folder connector you would be able to select the step where the custom function is invoked and see which nested table showed as an error.
As it is, I think you'll need to go into your Dataflow, select the combined query, hit Ctrl+A on the table to select the whole thing, then go to the Home tab > Keep Rows > Keep Errors.
Depending how large/complex your data pipeline is, this could take a significant amount of time, but it should retain every row that contains an error in any column which you can hopefully use to identify the offending file based on the data contained in the other columns.
Pete