
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem adds negative values
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?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what you are doing should work.Can you show a sample of your data?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
