Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
xtrimf
Creator
Creator

Delta Calculations

Hi,

I've ecountered a difficult (I think) problem.

The Table : Date, Item, stock

on the same date there can be several stock updates for a specific Item.

I need to calculate the delta of the stock between date and previous date.

the problem is that If i'm on Jun-01-2009, it does not mean that on Jun-01-2009 there was an update...

I need to find the last perofmed update for any given row / date and then calculate the delta...[:|]

Any Ideas?

4 Replies
Not applicable

Hi,

how you are able to identify if an update was made or not?

Are a kind of flag available?

Rainer

xtrimf
Creator
Creator
Author

I need to find out if there was an update, and when was the last one before my current position....

Not applicable

Hi,

here are an example to find the last record in a list. See the script for more details.

Maybe it´s a hint to find a solution.

Rainer

xtrimf
Creator
Creator
Author

Maybe its close...

The calc should be done in a script for each row!

for example, the data you entered for doc 112: (underlined what the new status SHOULD be)

112200901083Stat2 Stat2
112200901105Stat6 Stat2
112200902157Stat0 Stat6