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
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?
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?
- GilesWalker10 years agoSkilled Sharer
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
- Caitlin_Knox10 years agoAdvocate III
I'm having this same error, but am having difficulty performing the fix as you described.
When you say you deleted the text, what text did you delete? the '10' or the entire 'Columns=10'
This is my line of code as extracted from the Advanced editor
#"Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter="#(tab)", Columns=10 , Encoding=1200, QuoteStyle=QuoteStyle.None]),
So, my understanding of your suggestion is to replace with this:
#"Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter="#(tab)", , Encoding=1200, ]),
When I try that, I get teh error 'invalid identifier' so I know I'm not understanding right