DAX Function Guide

SUMX
Empty image or helper icon

Sam McKay

CEO & Founder

How does the SUMX work?
The SUMX function (DAX) returns the sum of an expression evaluated for each row in a table.
SUMX Formula Syntax

SUMX(
     <table>, <expression>
)

How do you use the SUMX?

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

Loading

Considerations when using the SUMX?

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.

Related Video Tutorials

Loading

Formula examples using the SUMX

=SUMX(FILTER(InternetSales, InternetSales[SalesTerritoryID]=5),[Freight])

SUMX = SUMX(Sales,Sales[Qty] * Sales[Price Per Unit])

=SUMX( FactInternetSales, FactInternetSales[SalesAmount]-FactInternetSales[TotalProductCost] )

Related Courses

Loading