Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Solution

Accepted Solutions
MayilVahanan

Hi,

 

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

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

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
Author

Hi,

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

Not applicable
Author

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

MayilVahanan

Hi,

 

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

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

You're a genius, thank you very much.