Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Gartner® Magic Quadrant™: 15 YEARS A LEADER - GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Summarisation in a hierarchy

Hi,

Here is my problem.

I have hierarchy like this one

WcontextWcontext1Wcontext2BASSINE_QTY
ParentName
PROECHTOUSPROECH4
TOUS
PROOCCTOUSPROOCC6
TOUS
TOKEYTOUSTOKEY20
TOUS
TOUS70

I used the hirarchy function to create that hierarchy

I would like to sum at each level , the BASSINE_QTY of the level + the BASSINE_QTY of the parents.

With that result :

WcontextWcontext1Wcontext2BASSINE_QTY
ParentName
PROECHTOUSPROECH74
TOUS
PROOCCTOUSPROOCC76
TOUS
TOKEYTOUSTOKEY90
TOUS
TOUS70

Does anyone has any idea how to do it ?

Thanks

Philippe

1 Solution

Accepted Solutions
Not applicable
Author

Philippe,

One way might be to create a resident table based on the sum of BASSINE_QTY:

Load ParentName, sum(BASSINE_QTY) as ChildrenTotal

resident .... group by ParentName

then a couple of lookups to fetch this total of the children and add this to the BASSINE_QTY of the parent where len(ParentName) > 0

Regards,

Gordon

View solution in original post

1 Reply
Not applicable
Author

Philippe,

One way might be to create a resident table based on the sum of BASSINE_QTY:

Load ParentName, sum(BASSINE_QTY) as ChildrenTotal

resident .... group by ParentName

then a couple of lookups to fetch this total of the children and add this to the BASSINE_QTY of the parent where len(ParentName) > 0

Regards,

Gordon