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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
FannyZ
Frequent Visitor

Text strings creates additional lines in csv extract

Hello,

 

I'm using power bi to merge multiple tables which one of them include some text manually entered coming from an excel sheet. On the excel sheet, we may have: 

"02/03: Update from OEM

24/02: checking stock" 

Which means, each lines are returned to a new line using alt-Enter

 

I created a table in power bi, which shows the excel text info (see column remarks).
In power BI, the column remark appears correctly. However, when I extract the data, the csv file return all info on the first line, and then adds a new line for all lines that were returned to a new line in the original excel sheet. 

Sorry, quite complex to explain, hope the pictures help.

 

How can I do to avoid that the lines are returned to a new cell ? 

FannyZ_0-1678113232614.png

FannyZ_0-1678113762327.png

 

 

 

2 ACCEPTED SOLUTIONS
v-xinruzhu-msft
Community Support
Community Support

Hi @FannyZ 

Can you provide the expected result you want or the sample expected result?

I'm a little confused by the problem you're described, do you mean you want to split the yellow parts of this image into each line?

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

FannyZ
Frequent Visitor

Hello,

 

Thank you for trying to help. At the end, I solved the issue by removing every returned line in my excel data based. 

View solution in original post

3 REPLIES 3
QuinnP
Advocate II
Advocate II

I found a simple solution to this problem. When reading the csv in power pivot, the QuoteStyle parameter of the Csv.Document function will determine whether newlines within a cell force the rest of the cell onto a new line or not. I changed this parameter from QuoteStyle.None to QuoteStyle.Csv and the issue was resolved.

QuinnP_0-1689921881724.png

I figured this out using the documentation for the Csv.Document function: Power Query Guide - Csv.Document.

FannyZ
Frequent Visitor

Hello,

 

Thank you for trying to help. At the end, I solved the issue by removing every returned line in my excel data based. 

v-xinruzhu-msft
Community Support
Community Support

Hi @FannyZ 

Can you provide the expected result you want or the sample expected result?

I'm a little confused by the problem you're described, do you mean you want to split the yellow parts of this image into each line?

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.