Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

To find the topmost Parent

Hi All,

Can someone help me out here..

I have 2 fields Child_ID and Parent_ID.. Need to find the topmost Parent.

I have no idea whether to use Loops or Hierarchy.

Please find the attachment for the example with explanation:

Child_IDParent_ID
12
23
37
45
510
611

To Find:

Topmost Parent of Child_ID 1

Process to find:

"When I choose 1 in Child_ID, its corresponding parent_ID is 2 and 5. Again when I search 5 in Child its corresponding parent is 10. When I search 10 in child_id again it is not found in Child_ID. Hence the Topmost parent of 1 would be 10.

In similar way when I search for 2 in Child its corresponding parent is 3. when I search for 3 in child_id its parent is 7. when I search for 7 in child_id again it is not found in Child_ID and thus, topmost parent for 1 is 7 also."

Result:

For Child_ID 1 the topmost Parent_ID would be 7 and 10

Tags (1)
1 Reply
vikasmahajan
Honored Contributor III

Re: To find the topmost Parent

YOU NEED TO CREATE HIERARCHY LOAD  PLEASE FIND EXAMPLE

Hierarchy belong to script error

Hierarchy belong to script errorHierarchy in QlikView

May help you.

VIKAS