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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

remaining by rows

good afternoon,

could you help me to find solution about remaining by rows?

Example:

article  despatch-date  stock-lev  sales

xxxx1     03/05/14         5000        1000

xxxx1     10/05/14         4000          500

xxxx1     11/05/14         3500          100

xxxx1     13/05/14         3400          500

xxxx1     15/05/14         2900          ........

where my stock-level is value (stock-lev, raw-1) - value (sales)

I hope it's all clear.

thanks for your help

Mauro

9 Replies
Not applicable
Author

sorry,

could you write me a formula because I can't open file.qvd (in this moment).

Thanks

Mauro

anbu1984
Master III
Master III

Can you show your input and explain how you derived your example data? What is raw?

What do you mean by value (stock-lev, raw-1)?

Not applicable
Author

Hi Mauro Venzo,

Could you be more specific about your problem..

Thank you

tresesco
MVP
MVP

Are you calculating the  'stock-lev' ? if so, then how do you get the first value '5000' ?

maxgro
MVP
MVP

let me try

source:

load * inline [

article , despatchdate , stocklev , sales

xxxx1   ,  03/05/14 ,        5000 ,       1000

xxxx1   ,  10/05/14 ,        4000 ,         500

xxxx1   ,  11/05/14 ,        3500 ,         100

xxxx1   ,  13/05/14 ,        3400 ,         500

xxxx1   ,  15/05/14 ,        2900 ,         .......

];

table:

NoConcatenate

load

  article,

  despatchdate,

  stocklev,

  sales,

  if(peek(article)=article, peek(newstocklevel) - peek(sales), 5000) as  newstocklevel

Resident

  source

order by article,

  despatchdate;

DROP Table source;

Not applicable
Author

Good afternoon Massimo,

thanks a lot for you reply!

Are you Italian?

Can I write you in Italian directly so I can explain better my issue?

Regards

Mauro

Da: Massimo Grossi

Inviato: lunedì 5 maggio 2014 14:24

A: Venzo, Mauro

Oggetto: Re: - remaining by rows

Qlik Community<http://community.qlik.com/>

remaining by rows

reply from Massimo Grossi<http://community.qlik.com/people/maxgro?et=watches.email.thread> in New to QlikView - View the full discussion<http://community.qlik.com/message/522054?et=watches.email.thread#522054>

Not applicable
Author

article  despatch-date   good-entry   stock-lev     sales

xxxx1     03/05/14             5000                            1000

xxxx1    10/05/14                               4000             500

xxxx1     11/05/14                              3500             100

xxxx1     13/05/14                              3400             500

xxxx1     15/05/14                              2900          

Yes, I would like to calcolate the stock level by the formula (if it's possible) and not "SCRIPT".

thanks for your reply

Mauro

tresesco
MVP
MVP

See attached qvw.

Not applicable
Author

thanks a lot!