Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis modify set by field value of another tabel

Hi All,

Hope somebody can help me on this.

I have 2 tables, one table contains item/DKU specific informations, the other Inventory quantities by item/sku and location/warehouse

my target is to make a straight table with SKU and SKUdescription as dimension and as expression total inventory, plus the inventory from the DefaultWarehouse. The default warehouse is defined in the SKU Data Table and the Inventory quantities by item are in the Stock information Table. (see attached qvw)

sample.jpg

The result should be

100001 = 10 (defaultWarehouse = Warehouse1)

100002 = 14 (defaultWarehouse = Warehouse2)

100003 = 18 (defaultWarehouse = Warehouse3)

would be great if somebody could help me on this

many thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Great, thats what i tried to achiev....

Many thanks

Sample qvw with both solution is attached

1. If Statement

sum(if(InventoryLocation = DefaultWarehouse, InventoryQTY))

2. Set analysis

Sum({<InventoryQTY= {"(=InventoryLocation=DefaultWarehouse)"}>} InventoryQTY)

View solution in original post

4 Replies
karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

Instead of

Sum({<InventoryLocation = {$(=only( DefaultWarehouse))}>} InventoryQTY)

please try this:

sum(if(InventoryLocation = DefaultWarehouse, InventoryQTY))

as your second expression.

Anonymous
Not applicable
Author

thanks, this works...

Is it also possible by set analysis?

Like

Sum({<InventoryLocation ={"$(=([DefaultWarehouse]))"}>} InventoryQTY)

spend some time on it and would be great to know if something could work as well...

aarkay29
Specialist
Specialist

or This

Sum({<InventoryQTY= {"(=InventoryLocation=DefaultWarehouse)"}>} InventoryQTY)

Anonymous
Not applicable
Author

Great, thats what i tried to achiev....

Many thanks

Sample qvw with both solution is attached

1. If Statement

sum(if(InventoryLocation = DefaultWarehouse, InventoryQTY))

2. Set analysis

Sum({<InventoryQTY= {"(=InventoryLocation=DefaultWarehouse)"}>} InventoryQTY)