Documents for QlikView related information.
I want to talk about Inventory Balance. How we can count curent Balance when we know Opening Balance and Periodic operation.
For example, we have curent debt on 01.01.2017:
And you have operation list:
There is and operation which show "in" and "out" payments in list of operation. We need to know Opening and Closing balance on every day.
Lets do it!
LOAD Date(Date) as Date,
(biff, embedded labels, table is Sheet1$);
Left Join (tmpOperation)
(ooxml, embedded labels, table is Лист1);
Sum(Amount) as DayBalance,
Max(OpeningBalance) as OpeningBalance
Group By ID, Date
Order By ID, Date
DROP Table tmpOperation;
If(IsNull(Previous(OpeningBalance)) or ID<>Previous(ID),OpeningBalance,Peek(ClosingBalance)) as OpeningBalance,
If(IsNull(Previous(OpeningBalance)) or ID<>Previous(ID),OpeningBalance+DayBalance,Peek(ClosingBalance)+DayBalance) as ClosingBalance
DROP Table Operation;
After that we have table like this: