Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

kamalqlik
Not applicable

Hierarchy Belongs to

Hi ,

         I want an example that How Hierarchy belongs to work.

Thanks and regards

Kamal

2 Replies
Henric_Cronström
Not applicable

Re: Hierarchy Belongs to

The HierarchyBelongsTo creates a table containing all possible ancestors to all nodes in a hierarchy table. In the attached files you have 10 nodes but tha ancestors table contains 29 records: every node has potentiall several ancestors.

robertomedellin
Not applicable

Re: Hierarchy Belongs to

Hi. If you have 2 levels, then hierarchybelongsto makes no differences at all. With 3 levels, the difference is not that relevant but there is, and that's where it starts, basically is just to have a Parent ListBox that works better.

Let say you have 5 levels.

You select a parent in level 3. Hierarchy (simple one) will associate it with just its parent in level 2, and children in level 4. That's it, 1 level up, 1 level down.

But with hierarchybelongsto It will ALSO relate it with all ascendance and descendance. So it will know that the one selected (at level 3) has a boss in level 2, and also the superior boss in level 1 (Boss of his Boss, Parent of his parent). And not only descendance (children) directly at level 4, but also has hierarchy over some grandchildren/interns in level 5.

The more levels the more useful and notorious it becomes. But then again, only when selecting on the parent field which sometimes may be necessary, some other times not.