Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Solved! Go to Solution.
Power BI comprises 2 basic Calculation Engines: Aggregator Engine and Iterator Engine.
DAX SUM function belongs to the Aggregator Engine and it adds all the values in a single column to return the result. SUM considers a single column as a whole and returns a result. SUM and other aggregator functions are not capable of performing row-wise evaluations.
A typical SUM function looks like this:
SUM(<Column Name>)
SUM should be used whenever it is just a simple calculation across a single column and row-wise execution is not required. Hence, if your data is structured in a way that it contains only a single column of values, then you can use SUM to add up the values. The DAX SUM function operates over a single column and hence there is no need for an iterator in a case where you are simply trying to calculate the sum of a column of data.
Lets consider this example: Total Units = SUM(Sales_Table[Units])
The DAX SUM function considers a single column of data to add all the data in that column. So, the SUM function will add every single value in the “Units” column of Sales_Table to return the total number of units.
A typical SUMX function looks like this:
SUMX (<Table>, <Expression>)
You can use the SUMX function whenever there is a need for the row-by-row calculation. Hence, if your data is structured in a way that you will necessarily need to multiply values from 2 columns one row at a time in order to get the desired result, you simply must use the SUMX Power BI function.
The Difference Between SUM vs SUMX In Power BI: https://blog.enterprisedna.co/difference-between-sum-vs-sumx-in-power-bi/
SUM Vs SUMX: What's The Difference Between These Two: https://www.youtube.com/watch?v=2Pu0z4GSs7g
DAX Beginners - SUM Vs SUMX in Power BI: https://www.youtube.com/watch?v=bQWwj9w06K4
Hope this helps you 🙂
Everythinhg that has an X and a nonX version is just syntax sugar. It is all X iterators.
The difference between sumx and sum in an example
"CC Consumables Total 1" it's a sumx measure where it firstly multiplies per row and then sums -- (20*79.51) + (-20*-79.51) = 1590.2 + 1590.2 = 3180.4
whereas "Multiply sum" it firstly sums the column and then it multiplies -- (20+(-20))*(79.51+(-79.51)) = 0+0=0
Hope this helps you 🙂
DAX Beginners - SUM Vs SUMX in Power BI: https://www.youtube.com/watch?v=bQWwj9w06K4
SUM Vs SUMX: What's The Difference Between These Two: https://www.youtube.com/watch?v=2Pu0z4GSs7g
The Difference Between SUM vs SUMX In Power BI: https://blog.enterprisedna.co/difference-between-sum-vs-sumx-in-power-bi/
Power BI comprises 2 basic Calculation Engines: Aggregator Engine and Iterator Engine.
DAX SUM function belongs to the Aggregator Engine and it adds all the values in a single column to return the result. SUM considers a single column as a whole and returns a result. SUM and other aggregator functions are not capable of performing row-wise evaluations.
A typical SUM function looks like this:
SUM(<Column Name>)
SUM should be used whenever it is just a simple calculation across a single column and row-wise execution is not required. Hence, if your data is structured in a way that it contains only a single column of values, then you can use SUM to add up the values. The DAX SUM function operates over a single column and hence there is no need for an iterator in a case where you are simply trying to calculate the sum of a column of data.
Lets consider this example: Total Units = SUM(Sales_Table[Units])
The DAX SUM function considers a single column of data to add all the data in that column. So, the SUM function will add every single value in the “Units” column of Sales_Table to return the total number of units.
A typical SUMX function looks like this:
SUMX (<Table>, <Expression>)
You can use the SUMX function whenever there is a need for the row-by-row calculation. Hence, if your data is structured in a way that you will necessarily need to multiply values from 2 columns one row at a time in order to get the desired result, you simply must use the SUMX Power BI function.
Everythinhg that has an X and a nonX version is just syntax sugar. It is all X iterators.
User | Count |
---|---|
121 | |
72 | |
71 | |
57 | |
50 |
User | Count |
---|---|
167 | |
83 | |
68 | |
65 | |
55 |