SUMX Function (DAX)
Returns the sum of an expression evaluated for each row in a table.
The table containing the rows for which the expression will be evaluated.
The expression to be evaluated for each row of the table.
A decimal number.
The SUMX function takes as its first argument a table, or an expression that returns a table. The second argument is a column that contains the numbers you want to sum, or an expression that evaluates to a column.
Only the numbers in the column are counted. Blanks, logical values, and text are ignored.
The following example first filters the table, InternetSales, on the expression, ShippingTerritoryID = 5, and then returns the sum of all values in the column, Freight. In other words, the expression returns the sum of freight charges for only the specified sales area.