Forum Discussion
Sumx totals wrong
- 6 years ago
Hi Anonymous ,
We think the step that caused the difference is that Table 13 has no column8.
Because SUM() is an aggregator function. It adds up all the values in a single column you specify after applying all filters that will impact the formula.
SUMX() is an iterator function. It works through a table, row by row to complete the evaluation after applying all filters.
The Table13 doesn’t have a column to distinguish each row, so when we use the SUM function, it will calculate the total and put it in each row. Then we use the SUMX function, it will iterate each row and add total together.
You also can refer to the following two great articles.
https://exceleratorbi.com.au/use-sum-vs-sumx/
https://radacad.com/sum-vs-sumx-what-is-the-difference-of-the-two-dax-functions-in-power-bi
If you have any question, please kindly ask here and we will try to resolve it.
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , what is the definition of the Measure
- Anonymous6 years agoNot applicable
HI measure definition is: SUM(table1 or 13; column9)
- Anonymous6 years agoNot applicable
Okay - thanks for the solution. This means I need to create a coloumn with a random value in each row to make sumx work. Great stuff. Have a nice day.