Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Copy / paste from Power Query in Power BI Desktop to Power Query in Power BI Service

Hi, when I copy a string containing line breaks from Power Query in Power BI Desktop to Power Query in Power BI Service, I get all line breaks replaced with (#CR) and/or (#LF). Why does this happen, is there a different line break encoding between desktop and service version of Power Query? Is there a work around? It si quite annoying, as we find doing coding in the desktop version to be much more efficient than in the service version of Power Query, so copying code from desktop to the service is the natural way to go.

 

Eirik

 

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, I should have added a screen shot of the issue to explain it better. This is what I get when I press Ok in Advanced Editor with a SELECT statment containing line breaks in Power Query in a dataflow in Power BI Service:

       

      It seems not to support regular linebreaks, but encodes them into #CR and #LF! So my question is: Is there any way to preserve normal line breaks in such a string in a dataflow in Power BI Service?

       

      • ibarrau's avatar
        ibarrau
        Super User

        This might sound crazy but I think I have seen this issue when you are writing the blank query, the whole script is not correct (it has a syntax error or something like that) and you click the Ok or accept button. Then the engine breaks the line break with the hidden code for that like (#cf).
        Be sure to copy, paste and finish the blank query with the Let and the In completely before closing the advanced editor. If it fails, it breaks.

        Hope that make sense. It's not the best approach I know 😞