Using DAX in Power BI


This course will provide you with the knowledge and skills to write DAX expressions to aid the development of models within Power BI Desktop.

Target audience

  • Anyone who will be creating Power BI Desktop models.
  • The course is aimed at both non-technical ‘power users’ and IT Professionals who will be creating models.



Delegates attending this course should have a thorough knowledge of Power BI Desktop. This can be gained by attending QAPBIDESK or QAPBIDT3.



Module 1: Overview
This module provides essential background information on the use of DAX within Microsoft products. The module outlines the uses of DAX within the Power BI model for calculating columns, measures and tables

      Lab :

  • Installing Power BI Desktop
  • Reviewing the existing model

Module 2: Basics and Aggregations
This module shows how to create basic calculations for columns and measures using DAX. The functions used in the module include SUMX, DISTINCTCOUNT, DIVIDE, CALCULATE, SUMMARIZE. VAR and RETURN are also used.

      Lab :

  • Creating calculated columns
  • Creating measures

Module 3: Working with dates and times
This module describes how to create a date / calendar table and the uses that table to create time intelligence calculations. The functions used in the module include CALENDAR, CALENDARAUTO, YEAR, MONTH, FORMAT, DATEDIFF, DATEADD, SAMEPERIODLASTYEAR, PARALLELPERIOD, ADDCOLUMNS, TOTALYTD, and DATESINPERIOD.

      Lab A:

  • Creates a date / calendar table using DAX

      Lab B:

  • Calculates delays of sales
  • Calculates percentage delays over all orders
  • Calculates year to date and year-on-year metrics
  • Calculates period-based metrics (average for last 3 months)

Module 4: Relational
This module describes how to use relational functions. The functions used in this module include RELATED, RELATEDTABLE, USERELATIONSHIP and LOOKUPVALUE.

      Lab :

  • Calculate costings using related tables
  • Enhance an existing table with total sales and then adding sales ranges
  • Show sales by delivery date using USERELATIONSHIP

Module 5: Filtering
This module describes how to use various filtering functions to add intelligence to the measures within the Power BI Desktop model. The functions used in this module include ALL, ALLEXCEPT, ALLSELECTED, FILTER, HASONEVALUE, VALUES, SELECTEDVALUES, and ISFILTERED.

      Lab :

  • Calculate percentage of all time for sales
  • Calculate percentage within a group
  • Calculate percentage of selected items

Module 6: Ranking and Positional
This module describes how to TOPN and RANKX to calculate and present positional information.

      Lab :

  • Calculate a Reseller rank for 2019
  • Calculate a Reseller for all time
  • Calculate a regional ranking for Resellers
  • Calculate and implement a dynamic TOPN with slicers

Module 7: Parent and Child
This module describes how to navigate and present a tree-structures parent and child table using Power BI Desktop and DAX. The module uses PATH, PATHITEM, PATHCONTAINS, PATHLENGTH and LOOKUPVALUE.

      Lab :

  • Calculate the number of direct reports for each member of staff
  • Calculate the sales staff path
  • Add levels within the sales hierarchy
  • Add logic to hide or show levels within the hierarchy