# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

Hi World,

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

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

Please, Help me! I need a solution.

Tags (2)
7 Replies
Honored Contributor 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)

Contributor II

Hi Karen,

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

Hope this helps.

Justin.

New Contributor III

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?

New Contributor III

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

MVP

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))

New Contributor III