The DAX shortcut guide to boost your productivity

Joel Monteiro
February 14, 2020

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

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

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

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

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

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
Next article

Better than roses or chocolate: 20% off PowerBI Robots and Tiles Pro!

Until February 16th, we are celebrating Valentine's Day with a 20% discount on both PowerBI Tiles Pro and PowerBI Robots. Click to link to grab your code!

Joel Monteiro
February 12, 2020