Forum Discussion
The Csv.Document parameter 'Columns' is invalid.
- 10 years ago
My IT department managed to fix the issue. We went through the advanced editor in query mode and manually changed the coding to get it to work.
This is how we did it:
This line of text is incorrect:
Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter=","columns=10, Encoding=1252]),
The columns=10 was counting the columns in the document (10 is correct) but something was going wrong. We deleted this text but lef tin the commas and republished the file. It then failed again due to this error:
The Csv.Document parameter 'QuoteStyle' is invalid. From memory the advanced editor text looked like this:
Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter=","columns=10, Encoding=1252]), QuoteStyle=QuoteStyle""
We deleted the QuoteStyle text and republished. The dashboard now refreshes using the automated refresh feature in Pro.
Thanks,
Giles
Can you post a sample of your CSV file that you are having trouble with, particular the column names and a row or two of data?
Here you go:
| Consignment | Docket | Date Loaded | Depot | Wagon | Product | Gross | Tare | Net | Overcarry |
| RA17221 | RA00318461 | 12/04/2016 5:04 | 010Y | THFY015-N | 13068 | 66.8 | 20.65 | 46.15 | 1.65 |
| RA17221 | RA00318462 | 12/04/2016 5:03 | 010Y | THFY012-J | 13068 | 66.9 | 20.5 | 46.4 | 1.35 |
| RA17221 | RA00318463 | 12/04/2016 5:09 | 010Y | THFY002 | 13068 | 67 | 19.65 | 47.35 | 0 |
All the CSV files are the same, they have roughly 20 rows but the columns will never change. I have done a couple formatting changes to the files such as changing the date loaded column to be split into two columns date and time. The Wagon column is used to created a custom column which removes all the characters apart from the numbers.
Thanks,
Giles
- Greg_Deckler10 years agoCommunity Champion
GilesWalker - Hmmm, I can't replicate it. I took your data and copied and pasted it into a file, wagons_tab.csv and then also created a true comma-separated file, wagons.csv, removed the tabs and replaced with commas. Both imported no problem using CSV as data source. Wasn't expecting that.
Um, what version of Power BI Desktop are you running?
- GilesWalker10 years agoSkilled Sharer
Thats the same thing that happens to me. If I load a single file there is no issue. However some of my other reports had this same issue popping up in the last couple weeks. These are reports which have had no change made to them in over three months. The only fix was to have the individual CSV files data set changed through the settings features in query mode to a TXT file.
The feature to change the file type is not available in the get data FILE catagory. The CSV example I posted is one of over a 500 files contained within this file which grows everyday so no chance of manually changing the files to TXT.
Thanks,
Giles
- Greg_Deckler10 years agoCommunity Champion
Might warrant going here and opening an actual support case:
https://powerbi.microsoft.com/en-us/support/
Contact Support link.
Did you recently update your Desktop?