I agree with your example and it does work with the inline statement, but something weird is happening. Here is an example. Every time I try to sum the quantities or group by, it does not add properly.
Things I have tried:
1) Store the table and open in a new session of qlikview.
2) Format Qty field while loading as a num() to ensure that the negative sign is not affecting it.
The only thing I can get to work is Set Analysis.
sum(Qty) always seems to double the counts which doesn't make sense because the field 'Key' is a perfect Key.
If I group by below and sum qty I would expect to get 5. But that does not happen. Very odd.