Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Advocate II
Advocate II

If Power Query M advanced editor would be actually advanced



It would be really nice if Power Query M advanced editors from both Power BI Service Dataflows, Power BI Desktop and Excel would be an actual "advanced" editor with code formatting features and in sync when it comes to automatically naming the steps.

'Cos currently, sometimes it will use a capitalized letter for the second word, sometimes not, sometimes calling it "Changed column type" other times "Transformed column".


And the code indentation...  It's kind of a mess even within a single one of those editors.


I have noticed that the indentation in Power Query Advanced editor is inconsistent.

Sometimes it will use 2 spaces, sometimes 4.

I mean, I don't care that from one query to another the indentation is different.  But it bothers me when I copy/paste steps from one script to another and I end up messing with the indentation having some lines at 4 spaces, some lines at 2 spaces.


Is there anything I can do to set the indentation to 2 spaces by default and have the editor enforce this rule for me?

I mean, I'm not even the one setting the indentation.  It seems to recognize the number of indentation and then set the tab to this number of spaces.

Like in this example, the tab is set to 2 spaces as we can see with the guide lines:



And then, in the same Dataflow, I have this other query where the tab is clearly set to 4 spaces:


And unless I copy/paste this code into VSCode for example and have the tab set to 2 spaces and copy it back, or I manually set the indentation to 2 spaces on every single line, there is no way or me to set the tab space to 2 instead of 4.

So I ended up using 4 spaces which I find impractical because it takes a lot of space in the screen and the Power Query advanced editor is not really advanced in terms of IDE.


Super User
Super User

Hi @FireFighter1017 ,


I do not believe that there are any "format" functionality at all (I would like things like "search" in it as well)!  Maybe you can add this to "Ideas".  If you do, please let us know and we can vote for it as well.


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

Proud to be a Datanaut!
Private message me for consulting or training needs.

I did just what you suggested.  Here's the idea request: Power Query Advanced Editor be an actual 'advanced... - Microsoft Fabric Community


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

Proud to be a Datanaut!
Private message me for consulting or training needs.

Super User
Super User

@FireFighter1017 Not much that can be done. The Advanced Editor is a misnomer. Should just be Code Editor.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors