The function SUMX has two parameters – a table and expression. The table parameter references a named table in a data model, while the expression completes a specified calculation row by row.
SUMX is an iterator function, because it iterates through all the rows in a table and calculates the expression for every single row.
Take a look at the example from the video:
Sales = SUMX (SalesTable, SalesTable[Price] * SalesTable [Quantity] )
The easy way to understand this function is to think of it as a two-step process. The first step multiplies each row of the column [Price] by a corresponding row in the column [Quantity]. Then it temporarily stores the preliminary results in the backend memory.
As the second step, the function sums up the preliminary results, giving us a total.
Watch our short tutorial with a clear example to understand the power of the SUMX function.