5 Replies Latest reply: Apr 9, 2018 2:24 PM by Burkhard Veidl

Hi, I'm new to Qlik. I have the following problem. I have a table with movements, some movements are positive and others negative. I need a totalizer for which I have a simple expression. sum (cantUM1). The problem is that I do not subtract the movements in negative. That is, is not taking the negative sign, how should I fix it?

• ###### Re: Problem adds negative values

what you are doing should work.Can you show a sample of your data?

• ###### Re: Problem adds negative values

his is a table in SQL, in this example they entered 411 units and came out 68.79. On my board solves me 411 + 68.79 + 231 + 2 +1, etc

• ###### Re: Problem adds negative values

Hi Frederico,

not sure I understand your problem, but if you want to ignore the negative values, you can use this expression:

sum (fabs(cantUM1)).

Fabs just gives you the absolute value!

Regards

Burkhard

• ###### Re: Problem adds negative values

My problem is that you are not subtracting the negative values. I add all the values, I need to subtract the negative ones. What expression should I use? Thank you!!

• ###### Re: Problem adds negative values

Hi Frederico,

this is exactly what the expression sum (fabs(cantUM1)) does. It adds the positive ones and subtracts the negative ones.

Why don't you try?

Regards

Burkhard