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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

looking for a stock example

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

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached example


talk is cheap, supply exceeds demand
amien
Specialist
Specialist
Author

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

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand
amien
Specialist
Specialist
Author

Excellent stuff Gysbert! .. works like a charm . Thanks