Forum Discussion
Cavring
Helper I
9 years agoTotal in a matrix is not considering negative values
Hi I have a matrix with a range of numbers. The problem is that the total sums up all numbers as if they were were postive. Problem: 2 735 000 + (-3 213 204) = 5 948 204 Should have been: 2 735...
Cavring
Helper I
9 years agoHi Anonymous
Here's my data:
Just so you know I found a solution and cleaned up my formulas. I have made a new measure, but it doesn't reproduce the error 100%.. The total for the whole matrix is still wong though. It doens not sum up correctly.
Vvelarde
Community Champion
9 years ago
Looking your data the fast solution in this scenario is:
TS Total Sum med fortegn =
IF (
HASONEVALUE ( Kontooversikt[Hovedpost] ),
[Total Sum] * [Fortegn],
CALCULATE (
[Total Sum] * [Fortegn],
Kontooversikt[Hovedpost] = "0 Variable inntekter"
)
+ CALCULATE (
[Total Sum] * [Fortegn],
Kontooversikt[Hovedpost] = "1 Faste kostnader"
)
+ CALCULATE (
[Total Sum] * [Fortegn],
Kontooversikt[Hovedpost] = "2 Variable kostnader"
)
+ CALCULATE (
[Total Sum] * [Fortegn],
Kontooversikt[Hovedpost] = "3 Finnans inntekter"
)
)
For now you can solve with this, and then with more time to analyze tour data you can optimize this dax.