Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
anyone got a stock example for me? I have the current stock postion of a certain material. Plus i have all the movements.
See it needs to be calculated backwards.
Example:
Material , Date , Current/Movement , Value
AAAA , 14/02/2013 , Current , 1000
AAAA , 12/02/2013 , Movement , -500
AAAA , 11/02/2013, Movement , 200
So my output tables should be:
AAAA , 14/02/2013 , 1000
AAAA , 13/02/2013 , 1000
AAAA , 12/02/2013 , 1500
AAAA , 11/02/2013 , 1300
etc
I'm not looking for an expression because of the number of rows to process.
Thanks in advanced
Because of the join. The gaps between dates will be filled for every movement on the date prior to the gap. You'll need to aggregate the movements first per date if you have more than one movement per date.
See attached example
Gysbert, Thanks for your help. Nice script, but i have a question.
Why doesn't it work when i have 2 rows for movements within the same day? see example
Because of the join. The gaps between dates will be filled for every movement on the date prior to the gap. You'll need to aggregate the movements first per date if you have more than one movement per date.
Excellent stuff Gysbert! .. works like a charm . Thanks