Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

karelibarcar
New 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.

Tags (2)
7 Replies
devarasu07
Honored Contributor II

Re: Bad Sum

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
Contributor II

Re: Bad Sum

Hi Karen,

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

total.png

Hope this helps.

Justin.

karelibarcar
New Contributor III

Re: Bad Sum

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
New Contributor III

Re: Bad Sum

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

Re: Bad Sum

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
New Contributor III

Re: Bad Sum

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
New Contributor III

Re: Bad Sum

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

Community Browser