
Extreme DAX
By :

There is a lot you can do with basic aggregation functions like SUM
and AVERAGE
, in combination with DAX filtering using CALCULATE
. But the DAX language goes beyond that. This section is about table functions, which open up an ocean of more advanced calculations in DAX. In Part 2 of this book, you will find that many of the business scenarios discussed involve DAX table functions.
To start, let's look closely at a simple aggregation in DAX:
Sales1 = SUM(fSales[SalesAmount])
The SUM
function in this formula traverses the fSales
table and retrieves the value in the SalesAmount
column from each row. All these values are summed up to provide the end result.
Because of the special way a Power BI model encodes and stores data (see Chapter 1.2, Model Design), this may not be what happens technically. Logically, however, this is what SUM
does, and that is what we are interested in here.
Now, suppose the...