Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ancestor/descendant hierarchy

Does anyone have any good ideas on how to build a complete
ancestor/descendant hierarchy

Let me illustrate - below is the treestructure data:

NodeID ParentID
--------------------------
1 NULL
2 1
3 2
4 2

This is the output that i want from the ancestor query:

AncestorID DescendantID
-----------------------------------------
1 2
2 3
2 4
1 3
1 4

Any help on how to achieve this would be greatly appreciated.

Best regards
Aviad

1 Reply
fernandotoledo
Partner - Specialist
Partner - Specialist

The best way to learn it is studing the PRESIDENTS example that comes with the qlikkview complete instalation.

It comes in a easy to understand case and a well commented script!

Enjoy!