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: 
vikasmahajan

Hierarchy belong to script error

Dear all

Following is my script I am getting script error  what could be problem in script , I want to try belongs to option.

Vikas

HierarchyTemp:

HIERARCHY(CHILD_ID, PARENT_ID, [HQ], [Parent Name], [HQ], [Path Name], '/')

LOAD Hqid AS [HQ Code],

     Hqname AS [HQ],GeoLevelName AS [Level Name],

     CHILD_ID, PARENT_ID,

     Sgid as [Sales Group Code],

     GeoCount ,

     Rmcount,

     [EmpName],

     [Email]

FROM

[..\Qvds\DIM_GeoHQMaster.qvd]

(qvd);

Ancestor_Table:

HierarchyBelongsTo (CHILD_ID,PARENT_ID, [HQ],Ancestor_ID,Ancestor_Name,DepthDiff)

LOAD

     Distinct

     [HQ Code],

  [HQ] ,

  [EmpName]

RESIDENT HierarchyTemp;

drop table HierarchyTemp;

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.
3 Replies
matthewjbryant
Creator II
Creator II

HI Vikas. What's the error?

matthewjbryant
Creator II
Creator II

In the information I've been reading lately it seems you would generally only have one connected column between these two tables (i.e. Parent_ID and [HQ] need changing in Ancestor_Table.

I don't think that's the source of the error though.

vikasmahajan
Author

resolved with by putting CHILD_ID in

Ancestor_Table:

HierarchyBelongsTo (CHILD_ID,PARENT_ID, [HQ],Ancestor_ID,Ancestor_Name,DepthDiff)

LOAD

     Distinct

    CHILD_ID,

     [HQ Code],

  [HQ] ,

  [EmpName]

RESIDENT HierarchyTemp;

drop table HierarchyTemp;

Solve my error.

Thanks

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.