Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
karelibarcar
Contributor III
Contributor III

Bad Sum

Hi World,

I have a question, Can you tell me why the total of the next sum is not corresponding with my values?

Sum.png

I attached you a qvf because I'm using an expression for this calculation.

Please, Help me! I need a solution.

7 Replies
devarasu07
Master II
Master II

Hi,

U have custom calculated measure, thats why it's shows different number. to fix this just use

sum(Saldo_Anterior)+ sum(Valor_Cuenta)

Capture.JPG

justinphamvn
Creator II
Creator II

Hi Karen,

I think you should set Measure Saldo Acumulado : Totals Function with Sum option

total.png

Hope this helps.

Justin.

karelibarcar
Contributor III
Contributor III
Author

Hi,

Thank you for your help, but in fact, the "1ACTIVO" account must be subtracted from the "2PASIVOS" account, then the personalization helps me differentiate the debtors' credit accounts, therefore, the result I expect is around 10 million. Do you understand me?

karelibarcar
Contributor III
Contributor III
Author

HI,

Thank you for your response, but the result I hope to obtain is around 10 million because one account is a debtor and another creditor

rubenmarin

Hi Karen, you will need to add data that tells wich accounts should substract instead of add.

For this particular case maybe works with:

Sum(Aggr(If(Left(Cod_Nom_Nivel1, 1)=1

, sum(Saldo_Anterior)+ sum(Valor_Cuenta)

, (sum(Saldo_Anterior)+ sum(Valor_Cuenta))*-1

, Cod_Nom_Nivel1))

If each Cod_Nom_nivel1 is related to the multiplier to apply (1 or -1) you can use:

Sum(Aggr(If(Left(Cod_Nom_Nivel1, 1)=1

, (sum(Saldo_Anterior)+ sum(Valor_Cuenta))*multiplier

, Cod_Nom_Nivel1))

karelibarcar
Contributor III
Contributor III
Author

Hi Ruben,

Already I have a variable called Identificador_Cuenta for identify this condition and it's used in my advanced expression, in all others Cod_Indicador the Sum of values is correct, but in this specific, Cod_Indicador = 23, I have this mistake and I can not resolve it.

karelibarcar
Contributor III
Contributor III
Author

For example, for the same Cod_Indicador = 23, but for other Indicador_Financiero, the total is correctSin título.png