Power Query Advanced Editor keyboard shortcuts

Remember my post about DAX formula bar keyboard shortcuts in Power BI Desktop? Turns out, there are also lots of keyboard shortcuts in Advanced Editor inside Power Query Editor in Power BI, with many being the same as in DAX formula bar!

First, I need to point out that for most of these keyboard shortcuts to work, you need to have M IntelliSense enabled — as of December 2018, it is a preview feature.

To do so, click File > Options and settings > Options > Preview features > M IntelliSense:

Second, you might notice that my GIFs below have something on the right side of Advanced Editor: mini map. Added in December 2018, this feature displays a bird’s-eye view of your code. To add it, click Display Options > Display mini map:

Comment/uncomment

You can comment out/uncomment one or more lines of code by pressing Ctrl + / or Alt + Shift + A.

  • Ctrl + / creates single-line comments
  • Alt + Shift + A creates a single block comment

Press Ctrl + / or Alt + Shift + A

Indent/outdent

You can increase the indentation by pressing Tab or Ctrl + ]. To decrease the indentation, press Shift + Tab or Ctrl + [.

Press Tab to indent and Shift + Tab to outdent

Multiple selections

You can type in multiple places at once by holding Alt + Click.

Press Alt + Click

 Go to line

In case you have many lines of code, you can go to a specific line number by pressing Ctrl + G and typing the line number, then pressing Enter.

Press Ctrl + G

Remove whole lines

You can remove whole lines, even if they are selected partially, by pressing Ctrl + Shift + K.

Trigger parameter hints

If you forgot the syntax of a function, you can press Ctrl + Shift + Space.

  • Виктор Косенков

    To enclose the selected fragment in quotation marks, you can hold down the Shift key and press the quoted key. And if you press the opening brackets “(” or “{” with the Shift, the selected fragment will be enclosed in the corresponding brackets. The square brackets “[” also work similarly, but without the Shift.
    Also, the editor Power Query responds interestingly to the Alt + Backspace key combination, but what does happen, I did not understand.

  • Artem

    Thank you very much for this post! Helped a lot.
    My two cents.

    In advanced editor view:
    F6 – go to OK button in advanced editor
    F7 – go to begin of the function
    ALT+UP/DOWN – changes the line number of selected lines
    CTRL+UP/DOWN – works as Scroll Lock
    ALT+SHIFT+UP/DOWN – copy selected lines before or after selected
    ALT+SHIFT+RIGHT – select whole word or section
    CTRL+TAB – moves through advanced editor buttons

    In Query editor view:
    CTRL+G – go to column

  • MickeyDr

    Great. Now all i need is the short cut key that opens up the Advance Editor!