Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi there I have a problem regarding the formula Sumx. Thing is that I need to use sumx because I want to multiply it with a realted table. So measure would be like Result = sumx(tablex, [measure] * RELATED(tableY;Column A)
The Measure part is what I have a question for. the attached Power pivot table shows the example. Measure 2 and 4 are identical but they come up with different numbers?
Why is this happening only when all columns are identical?
Table is this:
So table 13 sumx gives another result that sumx in table 1.
Please let me know why?
THanks
Solved! Go to Solution.
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.
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
HI measure definition is: SUM(table1 or 13; column9)
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.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |