Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can any one please help me, on "how to calculate Stock In Hand".
Below table is from excel.
date | StockIN | StockOUT | StockINH | LogicExplanation |
01/01/15 | 100 | 15 | 85 | 100 - 15 = 85 |
01/02/15 | 10 | 45 | 50 | 85 + 10 - 45 = 50 |
01/03/15 | 1 | 11 | 40 | 50 + 1 - 11 = 40 |
01/04/15 | 25 | 35 | 30 | 40 + 25 - 35 = 30 |
01/05/15 | 20 | 10 | 40 | 30 + 20 - 10 = 40 |
How to get the values in "StockINH" using qlikview.
I'm using personal edition, please tell me the procedure to achieve.
Thanks In Advance.
Regards,
Pavan.
Thanks Arul,
Thanks for your help.
Hi Pavan,
Instead of calculating on front end, calculate it on backend ... Because performance increase if u calculate at backend.. U can do these as:-
FD:
LOAD * INLINE [
date, StockIN, StockOUT
01-01-2015, 100, 15
01-02-2015, 10, 45
01-03-2015, 1, 11
01-04-2015, 25, 35
01-05-2015, 20, 10
];
FDT:
load Year(date(date,'YYYYMMDD')) as Year,
StockIN - StockOUT as InHand,
*
Resident FD order by date;
FD1: load
if(Year <> peek(Year),StockIN - StockOUT,peek(CB)+(InHand)) as CB,
*
Resident FDT;
drop table FD,FDT;
Regards,
Mukesh Chaudhari