Forum Discussion
When connecting to a csv source, data shows wrongly encoded
- 4 years ago
Hi simmi21 ,
When testing with the sample data you have provided, seems like it works fine in Power BI:
The .txt file also works:
Perhaps you can re-create a txt file with data to try to connect it in Power BI to check, then change to .csv file to re-connect to check it again.
If the data just show one column in the navigator, you can click transform data and split by delimiter as @ AlexisOlson manually, use the first row as the header.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
When you open the CSV file with Excel or a text editor, do you see the unencoded data?
yes, now its is unencoded but all in one column, the delimtter (which in my case is a semicolon ) is not working. This is how it is coming now :
- ronrsnfld4 years agoSuper User
Perhaps what looks like a semicolon is not a semicolon, but another character that appears similar. Can you please examine the characters to ascertain exactly what the character code is? You can do this in Excel with the UNICODE function; or using a Hex editor on the file.
- AlexisOlson4 years agoSuper User
You should be able to split the column in the query editor even if you load it as a single column.
- jennratten4 years agoSuper User
Can you please try importing with these same settings (snip below) and click Transform even though you only see the data in one column - then post a snip of what appears in the formula bar for the Source step?
The arugments specified in this line can make a difference. I have listed some examples below. Can you also paste your sample data into a text editor, save as CSV, import into Power BI and show us what result you get? This will help narrow the possibilities.
Csv.Document(File.Contents({{FilePath}}),[Delimiter=",", Encoding=1252])
Csv.Document(File.Contents({{FilePath}}),[Delimiter=";", Encoding=1252, QuoteStyle=QuoteStyle.None])