How it works...

Our first matrix visualization uses the Attendance measure. This measure displays Attended if the employee attended the training session in a week the employee worked and displays Not Attended if the employee did not attend the training session in a week the employee worked. To accomplish this, we start by getting the current training session, __Training, within the current context regardless of Employee. This is done by using CALCULATE coupled with ALLEXCEPT to override the filter context in order to remove all filters, including Employee from the R08_Employees table, but excluding the filter for the Training column in the R08_Training table.

We can now determine the date for the training, __TrainingDate. This is done by ...

Get DAX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.