Introduction to DAX for Power BI (2nd edition): Teaching Tips
In this class, students will be introduced to using Data Analysis Expressions (DAX). The course covers some of the theoretical underpinnings of the data model and the DAX language, but the emphasis is on using DAX to solve common business problems. Students will learn how to write their own calculated columns, measures, and tables, how to visualize the way Power BI computes DAX calculations, and how to troubleshoot custom code.
Important Points
It’s been our experience that for many students, one of the biggest hurdles is conceptualizing how the data model works, and how data is passed to DAX expressions. This makes sense, of course, since there isn’t any one place where it’s possible to see all of the data at the same time, and certainly most people can’t hold a representation of all of the data in a typical data model in their heads. This means that analysts have to be able to think through the process of computing a measure at a somewhat conceptual level. For example, the process of computing this measure:
TotalSales = SUM( Sales[SalesAmount] )
…might be described in this way: “Start with all of the data in the model. Now apply all relevant filters: report filters, page filters, slicers, etc. Take the rows that remain after all filters have been applied, take the values from the [SalesAmount] column, and add them all up.” We’ve found that it makes it easier for many analysts to practice expressing the process in a narrative manner, starting with a simple measure like this and getting progressively more complex.
Intended Audience
This course is meant for data professionals/analysts looking to hone their skills and master the fundamentals of the DAX language and its use in Power BI. The expectation is that students attending this class should already have at least a basic understanding of how to navigate in Power BI Desktop and how to create basic reports.
Labs & Exercises
Each module is followed by a 45-to-60 minute lab, intended to give students hands-on experience with the topics presented in the chapter. Students should be encouraged to work independently, as labs are guided step-by-step, and designed to be manageable for the intended student in this class. Of course, the instructor should be available for any questions that come up regarding lab exercises.
The files that are needed for the labs can be found in the following GitHub repo: https://github.com/CostelloTechnicalConsulting/DAXIntro
Included in the lab materials is a file called “DAXIntro_CodeSnippets.txt”. It can be found in the Labs directory, which by default is located at “C:\Coursefiles\DAXIntro\Labs”. This file includes all the code necessary for completing the lab.
Along with the guided exercises, there are also more intensive, optional “challenge exercises” for each exercise. The challenge exercises include solutions with working code as well as images of the intended result. The instructor can use these answers as a point of reference for guiding students through the challenge exercises if necessary.