Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Klaus
Contributor II
Contributor II

Decrease in amount and keeping the result remaining. How to?

Hello,
I have a problem and I don't know what formula to use as an approach. How can I subtract the stock from the initial stock 24 each time it finds a value on the order so that on the following line I get the remaining stock: 12 .. 2 ..? As in the picture, what formula could I use?

stock decrease.png

 

2 Solutions

Accepted Solutions
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

clipboard_image_0.png

Refer logic at script level using peek() function.

 

Thanks and regards,

Arthur Fong

 

View solution in original post

Klaus
Contributor II
Contributor II
Author

ok that would be a solution but let's say I don't want to use peek and
I have another variant as the formula in the expression on the stock column?

View solution in original post

2 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

clipboard_image_0.png

Refer logic at script level using peek() function.

 

Thanks and regards,

Arthur Fong

 

Klaus
Contributor II
Contributor II
Author

ok that would be a solution but let's say I don't want to use peek and
I have another variant as the formula in the expression on the stock column?