Forum Discussion
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
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
3 Replies
- Pragati11
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
- edhans
Community Champion
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.
- v-easonf-msft
Community Support
Hi , MarcUrdang
Is this the answer you are looking for ?
Thanks Pragati11 for sharing. This is indeed a great article.
Best Regards,
Community Support Team _ Eason