
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding and subtracting in the same field
Hello Guys,
I have a situation where i have to add two columns and subtract another from it in the same field, i wrote the following expression to do that
Exp : Sum([Qty On Hand])+Sum([Purchase Quantity])-Sum([Sales Quantity])
Dimensions : Date and Item Number
At first it worked fine but then i was asked to change it in such a way that it should start counting with Qty on hand first and then should add if its purchase quantity and subtract if its sales quantity for each row.
to do that i did the following expression , Keeping in mind that column(4) here is the 1st expression here.
RangeSum(Above(TOTAL Column(4), 0, NoOfRows(TOTAL)))
it working only if i select an item number
and is not working if i don't make any selection on item number, it is just giving error and not loading the entire sheet.
Please help!!!
- Tags:
- new_to_qlikview

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
RangeSum(Above(Column(4), 0,RowNo()))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey I have tried this and the problem is, it should be adding or subtracting to the above row based on the sales order or purchase order.
but it is not doing that instead just showing if it would be -ve or +ve value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you share your App or a demo/test version of it?
