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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MarcUrdang
Post Patron
Post Patron

csv files and Power BI

Hi

I see that there are some threads around this but not sure how to implement.  I have a csv file where some of the cells in a particular field have data that has been carriage returned and then PBI defines it as two rows instead of just one. I believe there is something called QuoteStyle or something similar that can help manage this problem .... can you simplify the steps for me on how to manage this problem?

 

Thanks 

Marc

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @MarcUrdang ,

 

The following blog is quite nice on handling csv document in Power BI:

https://blog.crossjoin.co.uk/2018/03/09/an-in-depth-look-at-the-csv-document-m-function/

 

Hope this helps you.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @MarcUrdang 

Is this the answer you are looking for ?

A.png

 

B.png

Thanks @Pragati11   for sharing. This is indeed  a great article.

 

Best Regards,
Community Support Team _ Eason

edhans
Super User
Super User

See this article. Ken is splitting the data, but you can use this same method to replace the #(lf) with nothing (leave the replace with box empty).

 

It is a bit of a hassle dealing with this. PQ will insert all kinds of extra quotes and parentheses in your code you'll need to remove. For example, if you do a find/replace with #(lf) PQ creates this:

= Table.ReplaceValue(#"Changed Type1","#(#)(lf)","",Replacer.ReplaceText,{"memid"})

You'll need to edit it to this:

= Table.ReplaceValue(#"Changed Type1","#(lf)","",Replacer.ReplaceText,{"memid"})

 

if #(lf) doesn't work, try #(cr) or #(cr)#(lf) depending on what your source data has. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Pragati11
Super User
Super User

Hi @MarcUrdang ,

 

The following blog is quite nice on handling csv document in Power BI:

https://blog.crossjoin.co.uk/2018/03/09/an-in-depth-look-at-the-csv-document-m-function/

 

Hope this helps you.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors