Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem while displaying the Stock report

Hi All,

I am trying to generate an stock statment for everyday using data feeds.My data feed in QlikView is as below

AsOfDatePrevDateClassificationStock AsOf DateFROMRegionTest
15/05/200914/05/2009AAA32TESTALLA
15/05/200914/05/2009BBB550BUYALLB
15/05/200914/05/2009CCC0DRAFTALLC
15/05/200914/05/2009AAA29KESTALLD
18/05/200915/05/2009AAA36SUJALLE
18/05/200915/05/2009BBB497MATALLF
18/05/200915/05/2009CCC0HONEALLG
18/05/200915/05/2009AAA41MONDAYALLH


so on 15th May I want to show the stock I had as on Prev Date i.e. 14th May. On week ends we dont have stock updates, so on 18th May I have to display stock for 15th May and also new Stock added on 18th. so the out put would like as

AsOfDatePrevDateClassificationPrevious Stock as of PrevDateCurrent Stock As of Date
15/05/200914/05/2009AAA032
15/05/200914/05/2009BBB0550
15/05/200914/05/2009CCC00
15/05/200914/05/2009AAA029
18/05/200915/05/2009AAA3236
18/05/200915/05/2009BBB550497
18/05/200915/05/2009CCC00
18/05/200915/05/2009AAA2941


how to achive this in QlikView any idea to achive this? I tried to use intra chart functions, but no luck.

Regards,

Amit.

4 Replies
sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi Amith

Can u attach ur application here? Then it ll easy to find the results

-Sathish

Anonymous
Not applicable
Author

Hi asomani,

If I'm understanding the issue correctly you should be able to sort the table on Classification and Date so that all AAA are listed in incremental date order, then all BBB etc. Now you can use peek() to load the value from the previous row.

I believe there are a couple of examples on sorting and peek-ing in the forums.

//Jsn

Not applicable
Author

I cannot use the Peek and previous functions in my charts/Pivot table. Can you tell me how to use this in Pivot table?

Regards,

Amit

Anonymous
Not applicable
Author

Amit,
In pivot table you can use above() instead of previous(). But it may be better in your situation to use peek() in the load script to create the data there. Take a look at the
http://community.qlik.com/forums/p/16266/63396.aspx#63396
See my attachemnt FillWithPrev.zip (not the superdare.qvw), maybe it will give you a solution or at least an idea.