Forum Discussion
Losing a column when importing PDF
I'm not sure about the PDF connector, but check out your M code in the Advanced editor. The first line for a CSV import though might look like this:
= Csv.Document(#"C:\Users\FileList txt",[Delimiter=":", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None])
It doesn't matter if that file gets a 3rd column added, it will always only read the first two. I remove that.
= Csv.Document(#"C:\Users\FileList txt",[Delimiter=":", Encoding=1252, QuoteStyle=QuoteStyle.None])
See if your PDF connection has that same setting.
Hi edhans , thanks for answering :).
For the PDF the code generated automatically is this:
= Pdf.Tables(File.Contents("C:\whatever direction i have the file"), [Implementation="1.3"])Any thoughts on how to solve the issue?
- edhans4 years agoCommunity Champion
Are all columns coming in, but your M code isn't handleing a 2 or 3 column table depending on the file? If so, check out this blog post. Removing/Selecting Columns - Pitfall #5 in #PowerBI and #PowerQuery - DataChant - particularly the MissingField.Ignore discussion.
- diego_martinezn4 years agoFrequent Visitor
Depending on the file (all have the same structure) it recognizes 2 or 3 tables.
When there are 2 tables there are no problems, but when it recognizes 3 there is a column that is not loaded I don't know why. It's not that I deleted it during transformation or something like that, it is missing from the beginning.
- diego_martinezn4 years agoFrequent Visitor
Hi edhans
Depending on the file (all have the same structure) it recognizes 2 or 3 tables.
When there are 2 tables there are no problems, but when it recognizes 3 there is a column that is not loaded I don't know why. It's not that I deleted it during transformation or something like that, it is missing from the beginning.
- edhans4 years agoCommunity Champion
Without code or samples, next to impossible for me to help here. Not sure what the issue is. How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.