Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to generate an stock statment for everyday using data feeds.My data feed in QlikView is as below
AsOfDate | PrevDate | Classification | Stock AsOf Date | FROM | Region | Test |
15/05/2009 | 14/05/2009 | AAA | 32 | TEST | ALL | A |
15/05/2009 | 14/05/2009 | BBB | 550 | BUY | ALL | B |
15/05/2009 | 14/05/2009 | CCC | 0 | DRAFT | ALL | C |
15/05/2009 | 14/05/2009 | AAA | 29 | KEST | ALL | D |
18/05/2009 | 15/05/2009 | AAA | 36 | SUJ | ALL | E |
18/05/2009 | 15/05/2009 | BBB | 497 | MAT | ALL | F |
18/05/2009 | 15/05/2009 | CCC | 0 | HONE | ALL | G |
18/05/2009 | 15/05/2009 | AAA | 41 | MONDAY | ALL | H |
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
AsOfDate | PrevDate | Classification | Previous Stock as of PrevDate | Current Stock As of Date |
15/05/2009 | 14/05/2009 | AAA | 0 | 32 |
15/05/2009 | 14/05/2009 | BBB | 0 | 550 |
15/05/2009 | 14/05/2009 | CCC | 0 | 0 |
15/05/2009 | 14/05/2009 | AAA | 0 | 29 |
18/05/2009 | 15/05/2009 | AAA | 32 | 36 |
18/05/2009 | 15/05/2009 | BBB | 550 | 497 |
18/05/2009 | 15/05/2009 | CCC | 0 | 0 |
18/05/2009 | 15/05/2009 | AAA | 29 | 41 |
how to achive this in QlikView any idea to achive this? I tried to use intra chart functions, but no luck.
Regards,
Amit.
Hi Amith
Can u attach ur application here? Then it ll easy to find the results
-Sathish
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
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
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.