From the course: Power BI Data Modeling with DAX

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Iterators and row context: SUMX

Iterators and row context: SUMX - Power BI Tutorial

From the course: Power BI Data Modeling with DAX

Start my 1-month free trial

Iterators and row context: SUMX

- [Instructor] We've been working with aggregation functions or aggregators. Now we're going to work with an iterator. Let me tell you a little bit about the iterator function. The iteration functions have some of the same names as our aggregation functions but followed by an x. And here's how they work differently. What an iteration function does is it moves row by row through the table and does a calculation or retrives some data that we ask about and then it aggregates it when it's all done. Iteration functions really work in the same way that calculated columns work so often the iteration functions and the aggregation functions provide two different ways to achieve the same results. Sometimes we could use SUM or we could use SUMX and it's really a choice what you want to use but there are times when SUMX is exactly what we want and I'm going to give you an example of that. I'd like to do a calculation on returns so that…

Contents