March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Can someone please explain to me why or how PowerBI gets to this value when summing decimals.
Power BI:
Excel:
Solved! Go to Solution.
Hi @Anonymous ,
This is due to the measure context. For example, I have the following example data and then I use the formula to create the measure, then the totals section will show the sum of the value of the largest type (i.e. the sum of type d is 5).
TypeValue
a | 5 |
a | 10 |
b | 1 |
b | 2 |
b | 3 |
c | 4 |
d | 5 |
SUM_Value =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
So if you want the Total to sum all values, then a general formula is:
Total_SUM =
IF (
ISFILTERED ( 'Table'[Type] ),
[SUM_Value],
SUMX ( ALLSELECTED ( 'Table'[Type] ), [SUM_Value] )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
This is due to the measure context. For example, I have the following example data and then I use the formula to create the measure, then the totals section will show the sum of the value of the largest type (i.e. the sum of type d is 5).
TypeValue
a | 5 |
a | 10 |
b | 1 |
b | 2 |
b | 3 |
c | 4 |
d | 5 |
SUM_Value =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
So if you want the Total to sum all values, then a general formula is:
Total_SUM =
IF (
ISFILTERED ( 'Table'[Type] ),
[SUM_Value],
SUMX ( ALLSELECTED ( 'Table'[Type] ), [SUM_Value] )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The best way to start is to acknowledge that totals are not incorrect, they're just not what you want in the situation at hand.
There are some solutions here:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
and
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
You can also search the forum for 'wrong totals' or similar. You won't be short of responses
Is it an addition or is it a measure totals issue?
So my issue is that I have percentages per category, and I would like to get the average percentage dependant on the number of catagories selected. I'm unable to get accurate values because of the decimals are summed incorrectly.
This is the percentage that the DAX returns:
and it should be:
I think it is a measure total issue.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |