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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregated sums between parent-child tables

Hi guys. I have a problem I'm having trouble with.

I've got two tables, one called Products and one called Categories. Each Category record has a number of Products associated with it. Each Product has a CategoryID to refer to its parent. Each Product has a numeric Quantity field.

What I want to do is create a TotalQuantity field on the Category records that sums the Quantity field of all its Products. How can I do this? Please let me know if you have any questions.

Thanks!

Eric

Labels (1)
1 Reply
pover
Partner - Master
Partner - Master

Is this in the script or in the GUI?

If it is in the script do a join based on the category ID between the category table and the product table that contains the sum of quantity grouped by category ID.

If it is on the GUI side try a sum(total <category ID> quantity).

If this doesn't help please explain more or post a table with the example data you want to create.

Regards.