Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Empty fields in table

Hello,

I have a table called "Inventory cost" (pic 1)

1.png

Another table called "remained in stock" (pic 2)

4.png

So, I have to make final table

3.png

, 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)

11 Replies
Not applicable
Author

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.

Not applicable
Author

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(