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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
JoshT
Advocate III
Advocate III

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:

JoshT_0-1732009439892.png

after save:

JoshT_1-1732009904968.png

 

6 REPLIES 6
MFelix
Super User
Super User

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.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





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

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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





arrggh thought I had posted this in issues - thanks for pointing that out

Please send me the link to the issue so I can keep an eye on it.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors