How does the SUMX function (DAX) work?
The SUMX function (DAX) returns the sum of an expression evaluated for each row in a table.
SUMX Formula Syntax
How do you use the SUMX function?
It works through a table, row by row to complete the evaluation after applying all filters. SUMX() has awareness of rows in a table, and hence can reference the intersection of each row with any columns in the table. SUMX() can operate over a single column but can also operate over multiple columns too – because it has the ability to work row by row.
Related Blog Posts
Related Support Forum Posts
Considerations when using the SUMX function
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.
Related Video Tutorials
Formula examples using the SUMX function
SUMX = SUMX(Sales,Sales[Qty] * Sales[Price Per Unit])
=SUMX( FactInternetSales, FactInternetSales[SalesAmount]-FactInternetSales[TotalProductCost] )
Related DAX Functions
Related Course Modules
To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.