Nick Lee from Pragmatic Works shares his favorite Power BI tips and tricks for writing DAX (Data Analysis Expressions). In this tutorial, he focuses on practical shortcuts and quality-of-life improvements to make working with DAX more efficient and enjoyable.
Overview: Making DAX Easier
Nick’s video is not about teaching DAX concepts like filter context or row context but instead focuses on how to streamline the process of writing and managing DAX formulas in Power BI. Whether you’re new to DAX or a seasoned pro, these tricks can enhance your workflow.
Tips for Writing DAX in Power BI
1. Adjusting the Formula Bar Font Size
If you find the formula bar too small to read, you can adjust the font size in Power BI by:
- Selecting the formula bar.
- Holding Ctrl and scrolling up with your mouse wheel.
This improves readability, especially for users working on smaller monitors or staring at screens for extended periods.
2. Using Tab to Autocomplete Functions
When typing a DAX function, pressing Tab after typing the function name not only completes it but also adds necessary parentheses. This reduces the chance of syntax errors.
3. Removing Unwanted Dropdowns
Sometimes the Intellisense dropdown can obstruct your view while typing. Press Esc to hide it temporarily, allowing you to see what’s behind the popup.
4. Referencing Columns and Tables
Nick emphasizes best practices for referencing tables and columns in DAX:
- Always reference the table name first to avoid confusion with measures or variables.
- Use single quotes to bring up a list of all available tables.
- Start typing the column name directly after the single quote to filter the list and find the exact column faster.
5. Expanding Dropdown Boxes
When selecting columns, use the draggable gray box to expand dropdown menus if the list is too long to view at once.
6. Commenting Code
Comments are essential for documenting and debugging DAX formulas. In DAX, you can:
- Use
//for single-line comments. - Use
/* */for multi-line comments.
Nick demonstrates how to quickly add or remove comments across multiple lines using Ctrl + / or Ctrl + K + C (to comment) and Ctrl + K + U (to uncomment).
7. Writing on Multiple Lines Simultaneously
To edit multiple lines at once:
- Place the cursor where you want to start.
- Hold Ctrl + Alt and press the down arrow to extend the cursor to additional lines.
- Start typing, and the changes will apply to all selected lines.
This is particularly useful for creating repetitive logic, such as switch statements or conditional expressions.
8. Using Keyboard Shortcuts
Nick highlights other useful shortcuts to speed up your workflow:
- Ctrl + Backspace: Deletes entire words or lines at once.
- Shift + Enter: Creates a new line while keeping the current context active.
Debugging and Testing DAX
Nick demonstrates debugging techniques, such as commenting out specific parts of a formula to test isolated logic. These practices ensure accuracy and make troubleshooting easier.
Final Thoughts
Nick concludes by emphasizing that these tips and tricks are designed to improve the quality of life when working with DAX. While they may not be groundbreaking, they save time, reduce frustration, and make writing formulas smoother. For more in-depth training on Power BI and DAX, Pragmatic Works offers comprehensive courses and mentoring services.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power BI and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Nick has been a dedicated trainer and consultant since 2018, leveraging his extensive experience working with major companies, including Fortune 200 corporations, professional sports organizations, government entities, and leading firms in the finance and healthcare sectors. With a specialized focus on Power BI and data engineering, Nick has consistently demonstrated his ability to drive data-driven decision-making and optimize business processes. His commitment to excellence and his in-depth technical expertise have made him a trusted advisor and sought-after expert in the industry.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment