Syntax
Tutorial with example
In the video below, we will go through: how to use SUM() and SUMX(), the difference between them and when should we use one vs the other.
The DAX SUM function calculates the sum of all numbers in a column while the DAX SUMX function returns the sum of an expression for each row in a table.
02:28 Create a measure to calculate the total sales using SUMX function
03:40 Create a calculated column for total sales (row by row)
05:16 Create a measure to calculate the total sales using SUM function
06:00 Difference between SUM and SUMX

Download example file:
For this you need the Northwind dataset: https://www.youtube.com/watch?v=k3NMI…
or you can download our example directly: here.
Remarks
If any rows contain non-numeric values, blanks are returned.
If you want to filter the values that you are summing, you can use the SUMX function and specify an expression to sum over.
Let us know your thoughts...