Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gradually subtract from each post

Hej

I have a table

PartNo          Date               Qty          QtyDel          Wanted result for Qty
12720310-1 2015-01-12      0           20                  0
12720310-1 2015-01-14      -1           0                   0
12720310-1 2015-01-15      0           80                  0
12720310-1 2015-01-16      -100       0                   0
12720310-1 2015-01-19      -20        60                  0
12720310-1 2015-01-20      -40        0                    0
12720310-1 2015-01-21      -40        0                   -1
12720310-1 2015-01-23      -100        0                 -100

The column QtyDel are delivered units of one PartNo.

The column Qty are demands of the PartNo.

What I would like to do is to sum all posts of QtyDel (160).

Then starting from the top subtract the Qty

The result should then look like the Wanted result for Qty
On 2015-01-21 there remains -1 of the -40

The 160 units are now subtracted and after that Qty should be the same as before on 2015-01-23 and forward.

Did that make sense?

0 Replies