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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
JoshT
Advocate II
Advocate II

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.