Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hierarch and hierarchy belongs to

Hi can any body explain  about this functions and difference between these two functions.

Regards

3 Replies
nilo_pontes
Partner - Creator
Partner - Creator

Hi Venu,

Take a look at HIC's article: Hierarchies

There's a document attached, where he explains your questions.

Best Regards,

Nilo

aveeeeeee7en
Specialist III
Specialist III

Hi Venu

Hierarchy is used to create an Expanded Nodes table, where each level in the hierarchy is stored in a seperate field.  This makes it ideal for use in a listbox treeview, or a pivottable.

HierarchyBelongsTo is used to create an Ancestors table, which contains one record for every child-ancestor relation found in the data.  This makes it better suited for allowing selection of entire trees of data.

Reference:Brian Booden (Hierarchy Vs Hierarchy belongs to)

Hierarchy:

The syntax is:

Hierarchy (NodeID,ParentID, NodeName, [ParentName], [PathSource],

[PathName], [PathDelimiter], [Depth]) (loadstatement | selectstatement)

Where

NodeIDis the name of the field that contains the node id.

ParentIDis the name of the field that contains the node id of the parent node.

NodeName is the name of the field that contains the name of the node.

ParentName is a string used to name the new ParentNamefield. If omitted,

this field will not be created.

PathSource is the name of the field that contains the name of the node used

to build the node path. Optional parameter. If omitted, NodeNamewill be

used.

PathName is a string used to name the new Path field, which contains the

path from the root to the node. Optional parameter. If omitted, this field will

not be created.

Hierarchy Belongs To:

Hierarchy Belongs to

Hope that helps you to some extent.

Regards

Aviral Nag

nilo_pontes
Partner - Creator
Partner - Creator

Hi venu gopal,

Have you find what you were looking for?