
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Total Function in Vizlib Table does not work well
Dear Experts
Currently I am using extention Vizlib Table to aggregate some biz data
DC Stock: INV_CAL
BTP Unship:Rep_Unship_CAL
BTP In-Transit: Transit_CAL
Real Order: BLK_CAL
I am working on a new column [Need Repl Orders]
[Need Repl Orders]= Real Order - BTP InTransit - BTP Unship - @DC Stock
I wanna set it to zero when the result is minus. Therefore I set the expression as below
However, when I open total function in this table, the result is always zero
As you can found in the below screeshot, the result should be 202 but not zero
I try quite a lot ways still can't correct it. Could you kindly help advise how to make it happen?
You could also check my code in loading page as below as well
Thanks for your advise in advance
Ivan
- Tags:
- uncorrect total

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Experts
May I have your advise on this questions?
B.R
Ivan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see you have tried using AGGR with no luck. Here is an explanation on how to use it correctly.
You need to enclose the IF expression inside an AGGR function and use SUM as outer expression. Don´t forget to add all the fields used in your chart dimension as dimensions for the AGGR.
Here is an example:
SUM(AGGR( <original expression> , MTM_field, Family_field))
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others
