Forum Discussion

MarcUrdang's avatar
MarcUrdang
Icon for Post Patron rankPost Patron
6 years ago
Solved

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

3 Replies

  • edhans's avatar
    edhans
    Icon for Community Champion rankCommunity 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's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity 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