Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Kamil_edv
New Member

Missing data in csv import when backslash used in the text string containing double quotes

Hi Community,

during csv file import from datalake I miss some data if in a column there is text string containing double quotes.

Values with this quotes use backslash as an indicator.

Example string: Street name "additional name" number, number 2 - addendum"

in csv file looks like this: "Street name \"additional name\" number, number 2 - addendum", next column value

 

Colums are delimited by comma.

 

As a result I get in column: Street name \additional name\" number

there is a missing part in that column: , number 2 - addendum

and also further colums are affected as values in columns move and due to additional commas in text string threated as delimeter some values were not imported as there is declared number of columns during import.

 

Any hint how to properly import data from csv or prepare csv file to import?

 

here is a function used: = Csv.Document(#"https://****/datalake/***/*** csv",[Delimiter=",", Columns=426, Encoding=65001, QuoteStyle=QuoteStyle.Csv])

1 ACCEPTED SOLUTION
spinfuzer
Solution Sage
Solution Sage

Replace the backslash \ with a " then you can use the Csv.Document

 

 

 

 

 

Csv.Document(
    Text.Replace(
        Text.FromBinary(File.Contents("C:\path\to.csv"))
        , "\",""""),
    [Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.Csv]
)

 

 

 

 

 

 

View solution in original post

2 REPLIES 2
spinfuzer
Solution Sage
Solution Sage

Replace the backslash \ with a " then you can use the Csv.Document

 

 

 

 

 

Csv.Document(
    Text.Replace(
        Text.FromBinary(File.Contents("C:\path\to.csv"))
        , "\",""""),
    [Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.Csv]
)

 

 

 

 

 

 

Hello Spinfuzer, that's resolving my issue - thank you!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors