Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

error in expression Sum-if

Can somebody explain me why this formula does'nt work and show the error mesage:

sum(if(Finalizada_Act =1 and sum(CantidadCont)-Sum(Aggr(Cantidad_Act, ActividadId_TTD))<>0,1,0))

And what will be the correct one. Thanks in advance.

Pat.

Tags (2)
1 Solution

Accepted Solutions

Re: error in expression Sum-if

Hi,

 

Sum(if(Finalizada_Act =1 and (CantidadCont - (Aggr(Sum(Cantidad_Act), ActividadId_TTD)))<>0,1,0))

Hope it helps

6 Replies

Re: error in expression Sum-if

Hi,

     Try this,

     = sum(if(Finalizada_Act =1 and (sum(CantidadCont)-Sum(Aggr(Sum(Cantidad_Act), ActividadId_TTD))<>0),1,0))

     Check the value in text box - > Sum(Aggr(Sum(Cantidad_Act), ActividadId_TTD))

     Hope it helps

Not applicable

Re: error in expression Sum-if

Hi Mayil,

that doesn't work eather. The problem is that in both formula, the edit expresion box told me thet there is an error in expression.

pant.jpg

Not applicable

Re: error in expression Sum-if

Hi,

no, it show the same message, the brackets are not the problem.

Not applicable

Re: error in expression Sum-if

The following sentence is working:

if((sum(CantidadCont))-(Sum(Aggr(Cantidad_Act, ActividadId_TTD)))<>0,1,0)

But when I want to sum, it does'nt work and show an error in expresion:

Sum(if((sum(CantidadCont))-(Sum(Aggr(Cantidad_Act, ActividadId_TTD)))<>0,

1,0))

Re: error in expression Sum-if

Hi,

 

Sum(if(Finalizada_Act =1 and (CantidadCont - (Aggr(Sum(Cantidad_Act), ActividadId_TTD)))<>0,1,0))

Hope it helps

Not applicable

Re: error in expression Sum-if

You're a genius, thank you very much.

Community Browser