Tiny Tweaks Needed for the Power Query Editor

A collection of the issues I run into day to day using the Query Editor along with the magic sauce to make it better

me@jaykilleen.com wrote this about 7 years ago and it was last updated almost 4 years ago.


← Back to the Posts

I've been using the Query Editor for Power Query and Power BI since around early 2015. In this same time I've been learning Web Development with Ruby on Rails and more gneralised Programming using Ruby and Node.js. This has given me some great insight into how development should be done to achieve maximum productivity and minimise risk.

I won't go into the major items that are missing such as:

  1. Support for version control such as Git;
  2. Ability to write queries outside of Power Query or Power BI in your editor of choice (mine is Atom);
  3. Syntax Highlighting in the Query Editor;
  4. AutoCompletion in the Query Editor;
  5. Scripting using languages like Python, JavaScript or Ruby like VBA is to Excel, Word or Outlook.

Below (with some kind of rank of annoyance) are some simple tweaks that I think can be made to the Query Editor to give me a productivity boost:

Disclaimer: I know this is just a list of vscode features... so the sooner they bake vscode as the editor the better. We don't need another 20 years in the hole of VBA IDE.

1 - Double Click Select Entire Step Name

Power Query by default, names your query steps using natural language like Filter by Customer. But in the background, it is creating that step as `#"Filter by Customer"

2 - Double Click Select Include Underscores

If you use snake_case as your variable names, it becomes a pain to select the entire variable name when double clicking. Only the word gets selected, whereas, in most editors, it will select the entire string including the underscore _ and other strings connected by that underscore.

My workaround for this is to use camelCase or just PascalCase for each variable. My preference is PascalCase as this follows the naming convention of the Power Query M functions ie Table.AddColumn ... but you should just use something without spaces or underscores.

3 - Allow the User to Set the Default Variable Naming Case Style

I would love to just abolish the whole natural language #"" thing and replace everything with PascalCase ... or my real preference of snake_case. That way I resolve some of these other issues.

4 - Ctrl+D For Multi Selection

I know that vscode is being integrated as the editor for Power BI and that someday this might hit general available (GA) and make its way to the Power Query Editor. Until then, even having the Ctrl+D multi selection feature that most modern editors has would be a huge productivity boost. Right now, I end up copy/pasting to vscode to make the edit and then copy/paste back.

5 - Highlighting Text is Annoying

This one is hard to explain. I'll try and gif it.

6 - Allow Ctrl+F to Search

Do I need to even explain this. We get a huge dump of code (refer to the 'Prettify the Code' issue) and then are expected to eyeball the code to find that one line that we are looking for.

7 - Prettify the Code

When using GUI buttons to make transformations (ie what most people do rather than free type Power Query M into the editor) it should be formatted prettier. Things like indentation, multiple rows per line of code, just the usual stuff we do rather than dumping everything on one line in the editor.

8 - Indentation Length and Type (Tabs vs Spaces, 2 vs 4)

I just want indentation by default to be 2 spaces... it keeps things easy to read. I am not saying everyone should do this. I just want to be able to set option.

Similar