July 17, 2018
Hi Me Again
I have got my pdfs uploading from a folder and working fine filtered for the files I need and combining the 1st and 2nd pages but when a file with only one page added (supposedly filtered out by name containing "EIRE") the query that pulls the second page in fails, the transform sample query gives the error below if I remove the single page file it works again.
Expression.Error: The key didn't match any rows in the table.
Details:
Key=
Id=Page002
Table=[Table]
Eventually I intend to extract the data from the "Eire" files and append the the main table once I get this bit working
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
November 8, 2013
Hi John,
you should separate the queries for page 1 and 2. For page 2, catch the error with: try...otherwise .
Should be something like: try GetData(page2) otherwise #table( Table.ColumnNames(Page1), {} )
This way, instead of an error, you will get an empty table if page 2 is not in the file.
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
November 8, 2013
Use the Go To Error button that shows up in Transform sample2 query. Will highlight [id="Page002"]
Even you are filtering, automatic transformation steps remains as they are, they will not follow any other changes, they are not flexible.
Even if you filtered out the page, that page is hard written into the query and is still trying to perform operations on that page
Use try -otherwise in that query
Answers Post
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
November 8, 2013
July 17, 2018
Hi,
This has been working fine until a third page was added, now the transform sample file (2) is blank and the query gives a couple of errors
Expression.Error: The column '' of the table wasn't found.
Details:
details are blank and when I goto error I get this.
Expression.Error: The field '' of the record wasn't found.
Details:
Source.Name=01.07.2021
Column1=
Column2=
Column3=
Column4=
Column15=
Attribute=
Value=
Attribute - Copy=
I can't see what needs to be changed in the try/let to make it work
John
1 Guest(s)