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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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