Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Reply
vikasmahajan

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

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.