Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello,
I've noticed that SUMX is calculating measures in what I believe to be an incorrect way.
I find the results below to be confusing and/or unintuitive, so I just want to confirm if this is a bug or not.
Here is what I want to achieve
Here is the results which I get from PBI.
Here is what I would expect (calculated in Excel)
For individual I1, the summed revenue is 75000 higher in PBI than in Excel
My analysis
It seems that the measure is calculated for all "duplicated" entries/rows in the data.
In this example, the "Sum of Firm Hours" measure will sum the values from all identical rows, and not just the "current row".
So for the data rows {I1, Firm, 50, 50, 1}, the SUMX measure will evalute to (300 x 50) x 6 rows, instead of (50 x 50) x 6 rows.
The difference between these two calculations is 75000 in "revenue", which is also the difference between the Excel & PBI screenshots.
Here is the data I used in the example
| Individual | Type | Hours | Rate | Weight |
| I1 | Firm | 100 | 50 | 1 |
| I2 | Firm | 100 | 70 | 1 |
| I3 | Opportunity | 100 | 80 | 0,4 |
| I1 | Firm | 50 | 50 | 1 |
| I2 | Opportunity | 100 | 70 | 0,9 |
| I1 | Opportunity | 100 | 50 | 0,9 |
| I1 | Firm | 50 | 50 | 1 |
| I1 | Firm | 50 | 50 | 1 |
| I1 | Firm | 50 | 50 | 1 |
| I1 | Firm | 50 | 50 | 1 |
| I1 | Firm | 50 | 50 | 1 |
Here are my defined measures
Sum of hours = SUM(Facttable[Hours])Sum Firm hours = CALCULATE(
[Sum of hours],
FILTER(Facttable, Facttable[Type] = "Firm")
) + 0.9 * CALCULATE(
[Sum of hours],
FILTER(Facttable, Facttable[Type] = "Opportunity" && Facttable[Weight] = 0.9)
)Firm Revenue = SUMX(
Facttable,
[Sum Firm hours] * Facttable[Rate]
)Weighted Average charge out rate = DIVIDE([Firm Revenue], [Sum Firm hours])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.