From the course: Advanced Power BI: DAX Language, Formulas, and Calculations

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Iterator DAX functions and SUMX

Iterator DAX functions and SUMX

- [Instructor] There's a family of DAX aggregation functions, which end with the letter X, which include SUMX, AVERAGEX, COUNTX, MINX, MAXX, and PRODUCTX. These functions return a measure expression evaluated for the aggregation type indicated by the function prefix for each row in a table through two input parameters. The first is the table, and the second is the expression to return. Let's first explore how the SUMX function compares to the similar Excel SUMPRODUCT function in a standalone Power BI model I set up with a single data table. We'll first add a calculated column. I rarely add calculated columns to tables that aren't calculated from a DAX formula. But this column will serve as a helpful reference point as we'll see in the next few steps. I'll call this new field cost and set it equal to the units multiplied by the unit price multiplied by the exchange rate for the row context of this table, which we…

Contents