Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
XaviDomènech
Contributor
Contributor

Multti level hierarchy aggregation

Hello,

I need the top nodes to the hierarchy to accumulate the values of the child nodes in a tree structure.

I upload my data:

Hierarchy(NodeID, ParentID, NodeName, ParentName, NodeName, PathName, '\', Depth) LOAD * inline [
NodeID, ParentID, NodeName
1, 4, London
4, 5, UK
5, , Europe
6, 4, Bristol
];

LOAD * inline [
NodeID, import
1, 12
6, 11
];

I have:

Qlik Sense - Sin título - Tabla - 9 de octubre de 2021 (1).png

If I show de sum() at the tree format, the upper nodes not acumulate the values.

Qlik Sense - Sin título - 9 de octubre de 2021.png

 Can you help me???

 

Thanks

2 Solutions

Accepted Solutions
rubenmarin

Hi, you can try with HierarchyBelongsTo():

HierarchyBelongsTo (NodeID, ParentID, NodeName, ParentID, ParentName, DepthDiff)

And calculate the sum by ParentName

View solution in original post

XaviDomènech
Contributor
Contributor
Author

I Ruben

 

Thanks, the data is correct. 

Do you know how I can representen this hierarchyBelongsTo data in a tree type orgChar??

 

Thanks

View solution in original post

2 Replies
rubenmarin

Hi, you can try with HierarchyBelongsTo():

HierarchyBelongsTo (NodeID, ParentID, NodeName, ParentID, ParentName, DepthDiff)

And calculate the sum by ParentName

XaviDomènech
Contributor
Contributor
Author

I Ruben

 

Thanks, the data is correct. 

Do you know how I can representen this hierarchyBelongsTo data in a tree type orgChar??

 

Thanks