Forum Discussion

JoshT's avatar
JoshT
Advocate III
1 year ago

Advanced M Editor in dataflow Gen1 stripping formatting

When using the advanced editor for dataflows in the service, any formatting I've put in gets replaced with poor formatting that's hard to read when the dataflow is saved - this is especially the case with indentations, but sometimes it also changes the carriage returns. I've also noticed that there's inconsistency as to when indentations are two points or four, and it does not appear to respect changes made in this regard.

 

The editor should not be touching changes I've made, and should not be making standards of code worse. The advanced editor is already a bad development environment, if Power BI is to be taken as a serious product, it does not need to be actively making my life more difficult.

e.g. before save:

after save:

 

6 Replies

  • Hi JoshT ,

     

    Is this hapenning when you do any specific action, like copy+paste from another Dataflow/Power Query, when reopening the dataflow?

     

    I have tested on my side and was not able to reproduce this type of error, all the indentention I have added to my code remained the same after opening and closing the dataflow, duplicating it, adding new steps and other type of actions like that even after changin the indentation inside a specific step it remained the same.

    • JoshT's avatar
      JoshT
      Advocate III

      Thanks for looking at this Miguel. The change above was manually typed in the editor, I am picking up from a colleague who used to own these dataflows so can't speak for how they were editing, though I believe everything they did was via the interface (i.e. not directly in M at all).

       

      I have tried copying the query text into notepad++, but there are no hidden/unprintable characters showing. When I replace the four space indentation with two and copy back in, this is not preserved on save either. Without anything I can see in the global/project options, or the properties of the query itself, I think this is a case of the save routine doing something out of my control

      • MFelix's avatar
        MFelix
        Super User

        Try and place this question on the issues part of the forum maybe they can help you out.