In this step-by-step tutorial for beginners, learn how to use DAX (Data Analysis Expressions) in Microsoft Power BI. DAX is a formula language with functions. If you’ve ever written formulas in Excel, you’ll find that DAX is very familiar.
We’ll start by loading the sample data into a data model. Next, we establish relationships between the various tables.
Once the setup is complete, we’ll write our first measure. A measure is a calculation that runs across our data model. You’ll learn about a few different functions, including sum and count. You’ll also learn how to comment your expressions.
Next, we create a measure using operators, like addition, subtraction, division, and multiplication. We then dive into how you can create measures using a graphical user interface called Quick Measures.
We then move onto creating a calculated column and talk about the advantages and disadvantages of columns vs. measures.
We then dig into iterator functions and when you would use them compared to an aggregator function. Iterator functions include sumx, countx, averagex, maxx, minx, and rankx.
Next, we look at the date functions that are available and we use the one called weekday. We wrap up by looking at some logical functions, including find, if, and calculate.
- Additional resources
- 0:00 Introduction
- 0:49 Import data & create data model
- 3:25 Define relationships
- 5:14 Create new measure using sum function
- 10:22 Format measures
- 11:44 Edit & delete measures
- 12:33 Create new measure using count function
- 14:30 Create new measure using distinct function
- 16:02 Add comments to measures
- 16:56 Create new measure with operators
- 19:08 Quick Measure tool
- 20:36 Create calculated column
- 21:38 Measure vs. calculated column
- 22:07 Measure that references another measure
- 24:19 Iterator functions
- 27:32 Time & date functions
- 30:12 Find function
- 32:38 If function
- 33:54 Calculate function
- 36:39 Wrap up