Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
robpag46
Creator
Creator

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
robpag46
Creator
Creator
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
Partner

Hi,

Instead of

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

please try this:

sum(if(InventoryLocation = DefaultWarehouse, InventoryQTY))

as your second expression.

robpag46
Creator
Creator
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)

robpag46
Creator
Creator
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