10Introducing DAX
Though we covered this definition earlier, Data Analysis Expressions (DAX) is a formula language that is used for creating calculated columns, measures, and custom tables. It is a collection of functions, operators, and constants that can be used in a formula or expression to calculate and return one or more values. You can use DAX to solve a number of calculations and data analysis problems, which can help you create new information from data that is already in your model.
In this chapter, you will be introduced to the basics of DAX. We will whet your appetite by covering a handful of DAX functions. Even though it will be minimal, it will teach you the important foundational principles.
To do this, we are going to work with a star schema–modeled Azure SQL database that contains sales data from a standard Microsoft demo database, AdventureWorks. In the next section, I'll quickly walk you through the setup of the Power BI Desktop file. However, if you'd rather just jump to the meat of this chapter, then skip the “Setup” section and find the c10base.pbix file from the book resources file.
SETUP
The following steps show how to set up the Power BI Desktop file, and we've discussed all these concepts earlier in the book. Walking through these steps yourself will be an excellent test of applying what you've learned so far. However, if you get stuck, you can find the c10base.pbix file and start with that. So, let's get going!
- Open a new Power BI Desktop session. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access