DAX shortcut guide

The DAX shortcut guide to boost your productivity

Posted by

Learning about shortcuts is an integral part of mastering any program, and they come naturally as users get accustomed to using them. If you’re a regular reader of our blog, you might have noticed that Microsoft Power BI is one of the most popular programs at DevScope. We have a consultancy, and a development team specialized in Power BI, so Data Analysis Expressions (DAX) is used quite frequently around these parts.

We asked many members of our team for their favorite DAX shortcut when writing it in Power BI Desktop, and listed them here to help you boost your productivity:

The basics:

Go to line…: Ctrl + G

Go to a line
Insert the line’s number after pressing Ctrl + G

Select an entire line: Ctrl + I, regardless of where the cursor is

Undo the last cursor operation: Ctrl + U

Cut a line (empty selection): Ctrl + X

Insert a new line above: Ctrl + Shift + Enter

Jump to a matching bracket: Ctrl + Shift + \

Taggle betwen matching brackets
Taggle betwen matching brackets

Go to the start of your code: Ctrl + Home

Go to the end of your code: Ctrl + End

The intermediate:

Scroll line up or down: Ctrl + Up Arrow key or Ctrl + Down Arrow key

Indent right: Ctrl + ]

Indent left: Ctrl + [

Insert a new line, keeping indentation: Shift + Enter

The DAX shortcut guide to boost your productivity

Insert a new line, starting at the beginning: Alt + Enter

Activate IntelliSense: Ctrl + Space

Move the current line up or down: Alt + Up Arrow Key or Alt + Down Arrow Key

The advanced moves:

Comment multiple lines: Alt + Shift + A, Ctrl + KC or Ctrl + /

The DAX shortcut guide to boost your productivity
Firstly, select what you need to comment out

Uncomment multiple lines: Ctrl + KU or Ctrl + /

Toggle Tab Move Focus: Ctrl + M

Remove lines: highlight the lines you wish to remove and press Ctrl + Shift + K

Find and replace some instances of a word: firstly, use Ctrl + D to highlight the current word, then keep pressing Ctrl + D to find and highlight each instance of that word. Once highlighted all instances you wish to replace, start typing to replace all at once.

The DAX shortcut guide to boost your productivity
Keep pressing Ctrl + D until all instances of a word are highlighted

Find and replace all instances of a word at once: firstly, press Ctrl + Shift + L to highlight all instances of a word/selection, then start typing to replace all at once.

Copy a line: instead of Ctrl + C and Ctrl + V, you can copy the currently selected line to the one above or below it by either pressing Alt + Shift + Up Arrow Key or Alt + Shift + Down Arrow Key.

Making copies of a line in DAX
Keep pressing the up or down arrow keys to insert new copies of your line

Expand selection: press Alt + Shift + Right Arrow Key to select the nearest word. Do it successively to expand the selection.

Shrink selection: press Alt + Shift + Left Arrow Key successively to shrink the selection.

We hope some of this can be helpful to you when writing DAX. Let us know if we overlooked a useful DAX shortcut so we can add them to the list and pass them on to our team.

PowerBI Robots banner

Leave a Reply