Even if you aren’t familiar with the term “DAX”, you’ve probably already been using it! DAX, or Data Analysis Expressions, is the library of functions and operators that are shared across Microsoft SQL Server Analysis Services, Power Pivot in Excel, and Power BI Desktop. A good understanding of DAX can make report authoring more simple and more powerful, but as a functional language it’s often overwhelming for beginners.
On May 31, Paul Turley, Mentor for SolidQ and a Most Valuable Professional (MVP) for the Microsoft Data Platform, presented a Power BI Community Webinar on “Best DAX Practices From the Field”. During the 90 minute talk, Paul explored DAX language fundamentals and calculations, and gave some tips and tricks for using KPIs to get insights from your data.
If you’re just starting to learn DAX, check out Paul’s four recommended practices for new users below. You can also watch the presentation in its entirety, and don’t forget to sign up for future Power BI Community Webinars at aka.ms/communitywebinars!
- Worry about the important functions first.
DAX has many possible functions, and it can be hard to know where to start. Instead of worrying about all of your options, Paul recommends focusing on the nine key functions that you’ll likely be using most in your calculations.
- Skip memorizing and focus on understanding concepts.
There are many DAX resources available online and in publications, so you don’t need to memorize everything. Save and use these resources when necessary, and instead spend your time learning the concepts and patterns of the language.
- Keep your functions as readable as possible.
The nature of DAX functions means having a lot of calculations happening on a single line, so take the time as you go to keep your code legible. Delete unnecessary elements, use user-friendly descriptive names, and be explicit with your references. Your future self will thank you!
- Sort your measures by category.
As mentioned in Practice 2, a good way to learn DAX is to get familiar with its patterns, and then match those patterns to your project. One way to aid this process is to have a mental template for the different types of calculated measures that you’ll encounter during the code process. Instead of starting over from scratch each time, you’ll already be halfway there with a rough outline for your function.
DAX can be a challenging language for new users, but by following these four tips you can spend less time learning the language, and more time making your reports even more powerful. Watch all of Paul’s presentation on-demand to learn more about what DAX can do, how you can use it, and some live examples of functions in action.