Chapter 5. Aggregations, Measures, and DAX

In Chapter 1, we had a long conversation about the storage engine and the formula engine of Power BI. In Chapter 3, we were really talking about how the storage engine works and what it means to store data in your own personal Analysis Services instance. Now we’ll dive into the other half of what makes Power BI special: the formula engine.

Taking stock of our progress so far, we’ve put our data in Power BI and reviewed most of the visuals available in Power BI out of the box. We dragged and dropped values into visualizations to get results, but how did Power BI know what to display?

This chapter details the roles of aggregations, measures, and DAX as they relate to visualizations. What is an aggregation? What is a measure? What exactly is DAX? We’ll answer all these questions and explain what you need to know.

A Primer on the DAX Language

Data Analysis Expressions (DAX) is the language of the formula engine of Analysis Services Tabular and Power BI. It is a multifunctional query language that can be used to obtain specific results or create calculated tables or columns. Anytime you create a visual in Power BI, it generates DAX behind the scenes to get the data from the Power BI storage engine.

DAX is incredibly powerful, but like everything else in Power BI, it is really defined at the columnar or table level. That’s different from software like Excel, where things are defined at the individual cell level. DAX cannot modify ...

Get Learning Microsoft Power BI 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.