Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table called "Inventory cost" (pic 1)
Another table called "remained in stock" (pic 2)
So, I have to make final table
, where:
quantity in the begining calculated like
RangeSum(
Sum({$< InOrOut = {0}, DateMovement = {'<=$(vMinSelectedDate)'}, Date >} Quantity),
Sum({$< InOrOut = {1}, DateMovement = {'<=$(vMinSelectedDate)'}, Date >} Quantity*(-1))
)
Fields Quantity in, out and in the end calculated similarly.
Field "avg cost":
avg( aggr(sum(DISTINCT(cost +quantity)),Date, Item, DateItemCame))
The problem is that some fields in column avg cost is missed. Everything else calculated excellent.
Please help!
I'm new in qlikview. And sorry for my english)
Ok!
So,
table1 - "Inventory cost":
fields - Item, DateCome, QuantityCame, CostCame, Spending1, Spending2
table 2 - "Items movement":
fields - Item, DateMovement, InOrOut, QuantityMoved, Stock
Final table (what I want to see):
Stock, Item, AvgCost, QuantityForTheBeginning, QuantityIn, QuantityOut, QuantityInTheEnd.
Also, where the problem can sit in my opinion, the script
CalendarInventoryCameTemp:
LOAD
Date
Resident Calendar;
Left Join (CalendarInventoryCameTemp)
LOAD
Date as DateCome
Resident Calendar;
CalendarInventoryCame:
LOAD
Date
,DateCame
Resident CalendarInventoryCameTemp;
DROP Table CalendarInventoryCameTemp;
The same script for DateMovement.
I tried to do as you said, Jonathan, thank you.
But the result is the same. Some items is shown, and some is not. And I don't see the logic there. Because they all have the data in fields.
My intuition tells me Date making some problems there.
Please, any suggestions. 2nd day of a headache(