Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am migrating a QlikView dashboard to PBI, and I see that this formula is not a simple formula:
SUM(a*b)
so if you have SUM(2*3) the result wont be 6 ... to get the six I need to use SUM(a)*Sum(b) ... so why doews SUM(a*b) is different?
It looks like you are aggregating both on dimension level an on total. Let me extend @Or's example.
Dim,a, b
X, 2, 3
X, 2, 2
Y, 5, 10
Y, 1, 30
A table with sum aggregations might look like this.
Dim1, Sum(a), Sum(b), Sum(a)*Sum(b),Sum(a*b)
X, 4, 5, 20, 10
Y, 6, 40, 240, 80
Total, 10,45,450,90
Consider sum(a)*sum(b) as if you take the product of the row value of the two aggregations. Consider the sum(a*b) as the sum of a*b per data row.
For the rows:
a, b
2, 3
5, 10
Sum(a*b) =(2*3) + (5*10) = 56
Sum(a) * sum(b) = (2+5) * (3+10) = 91
here is the thing: I have this in Qlik
Result= SUM(A*B) but why? ... Result is the value that the client need so I need to understand to logic behind sum(a*b) :
sum({$<Indicador={'Estructura de la Deuda'}>} [Saldo al momento Sin Comisiones Dlls] * [Tasa Credito2])
It looks like you are aggregating both on dimension level an on total. Let me extend @Or's example.
Dim,a, b
X, 2, 3
X, 2, 2
Y, 5, 10
Y, 1, 30
A table with sum aggregations might look like this.
Dim1, Sum(a), Sum(b), Sum(a)*Sum(b),Sum(a*b)
X, 4, 5, 20, 10
Y, 6, 40, 240, 80
Total, 10,45,450,90
Consider sum(a)*sum(b) as if you take the product of the row value of the two aggregations. Consider the sum(a*b) as the sum of a*b per data row.