Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
engishfaque
Specialist III
Specialist III

Sum of quantity based on relations

Dear All,

I'm going to add the quantity of ProductSKU and ChildSKU fields.

For example (real scenario):

relations.xlsx file consist on all the parent and child relations.

In relations.xlsx file, threre is a ChildSKU = "NI-MF-006" with having 7 ParentsSKU, such as illustrated below:

relations.xlsx
parentSKUChildSKU
NI-70701NI-MF-006
NI-70701-ZZNI-MF-006
NI-70701-ZZ1NI-MF-006
NI-70701-ZZ2NI-MF-006
NI-MF-006-ZZ1NI-MF-006
NI-R6501-Gadsden35-MF-006-Set3NI-MF-006
NI-R6501-MF-006-Set2NI-MF-006
NI-MF-00623NI-MF-006

salesYTD2014_testing.xlsx file consist on quantity of each individual items (parent and child) such as illustrated below:

prod_skusum(quantity)
NI-MF-006540
NI-7070113
NI-70701-ZZ20
NI-70701-ZZ158
NI-70701-ZZ210
NI-MF-006-ZZ1141
NI-R6501-Gadsden35-MF-006-Set3227
NI-R6501-MF-006-Set2247
NI-MF-0062382

1. relations.xlsx file consist on relations

2. salesYTD2014_testing.xlsx file consist on quantity


Required Output:Sum of quantity must be sum of all the ParentSKU and ChildSKU in against of NI-MF-006 such as given below.

prod_skusumofquantity
NI-MF-0061338


Kindly find attached files.


Kind regards,

Ishfaque Ahmed

10 Replies
engishfaque
Specialist III
Specialist III
Author

Dear Jyothish,

Many thanks, problem has been resolved with your and @tylor cool solution.

Kind regards,

Ishfaque Ahmed