Discussion board where members can get started with QlikView.
Dear community -
Here's the issue I'm facing -
I/P Table :-
Each part # here can have different stock values wrt date. In my resulting table I want to show the the stock quantity of a part wrt to the latest date. Hence the O/p table should look like below -
Please suggest the best way to achieve this in the load script.
Thanks in advance
Timestamp(Timestamp#(UPD_DT_TM, 'M/D/YYYY h:m')) as UPD_DT_TM
(html, codepage is 1252, embedded labels, table is @1);
Left Join ([I/P Table])
1 as FlagLatest,
Timestamp(Max(UPD_DT_TM)) as UPD_DT_TM
View solution in original post
You could use a presceding load like this:
Just put the following code above your load script for the I/P Table:
sum(STOCK_QTY) as STOCK_QTY,
max(UPD_DT_TM) as UPD_DT_TM
Group by DEPOT_CD, PART_NO
//your current load script
May be ,this will help you.
Hi Snehasis ,
PFA the qvw for reference.
I have created a Flag called Latest Flag where in 1 represents latest and 0 represents old.
Thus, if you want a separate table for Latest Dates, create another table with a where condition of Latest Flag =1.
Do let me know for any concern or doubt.
May be the below link is useful:
Get Max Date and Max Value of a ID