Forum Discussion

FireFighter1017's avatar
FireFighter1017
Advocate III
2 years ago

If Power Query M advanced editor would be actually advanced

Hi,

 

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.

 

4 Replies