Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Hierarchies - problems with sub-trees

Hi everyone,

New to Qlikview and continuing with my growing pains.

I am struggling to implement a simple 3-level hierarchy where each level can be selected in a tree-view list box and show all associated values. I have followed Henric Cronstrohm's PDF manual as closely as possible. I am attaching it here for reference.

I am attaching the Excel file I used to construct the hierarchy. I have successfully created the two hierarchy tables, Hierarchy - ExpandedNodes and Hierarchy - AncestorTable. They are correctly linked to each other, and the rest of my data, by the field SegID (i.e. Node ID). There is only one other table. The list box is also displaying correctly, and I can select all levels. However, when I select higher levels, they return 0 values! Why are they not rolling up?

I would greatly appreciate anyone taking a quick look at my Excel file to see if I did anything wrong. Here is my current script:

Hierarchy(SegID, ParentID, Node, NodeParent, Node, NodePath, '|', NodeDepth)

LOAD SegID,

    ParentID,

    NodeName as Node

FROM

[\\e\QlikView\Data\ServiceSegmentation.xlsx]

(ooxml, embedded labels, table is Hierarchy);

HierarchyBelongsTo(SegID, ParentID, NodeName, TreeID, TreeName)

LOAD SegID,

    ParentID,

    NodeName

   

From

[\\e\QlikView\Data\ServiceSegmentation.xlsx]

(ooxml, embedded labels, table is Hierarchy);

RENAME Field Node1 to Sector;

RENAME Field Node2 to Segment;

RENAME Field Node3 to Subsegment;

3 Replies
Highlighted
Master II
Master II

Re: Hierarchies - problems with sub-trees

Hi.

They are not rolling up as there is no data associated with SegID (40 for example).

Read from the page 16, Henric Cronström describes exactly the issue that you have and the way to handle it.

Highlighted
Not applicable

Re: Hierarchies - problems with sub-trees

Hi Whiteline,

Thanks for responding!

From what I understand, I should have handled this problem by adding the Ancestor table, with the HierarchyBelongsTo function. This creates a second table with a Parent ID, so that Qlikview knows which sub-nodes are assigned to which node. That way, even if my data has no line associated with SegID 40, Qlikview will roll up all the lower levels.

HierarchyBelongsTo is described on page 16. Or were you referring to the instructions to add a third table for TreeID? I tried adding it, but it didn't fix my problem.

Highlighted
Master II
Master II

Re: Hierarchies - problems with sub-trees

There are some pictures with instructions.

It seems that you are using the wrong field for selection. You shoul use the one that have the association with SegID 40.