Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hierarchies and Tree-view List Boxes

Hello!  Total QlikView newbie here, so apologies in advance if my question qualifies as basic knowledge...

I'm trying to get a hierarchically ordered group to display in tree view within a list box.  I've followed the Qlikview Technical Briefing on Hierarchies and so far have been able to generate the following code, which has loaded correctly:

Hierarchy(SegID, ParentID, Name)

LOAD NodeID as SegID,

     ParentID,

     Name

I then go and create a group with Name2 and Name3 (the two levels of the hierarchy I would like to display), order them accordingly, and name the group.  Then, I insert my List Box with the group as the Field, and select "Show as TreeView."  No dice.  It will allow me to drill down correctly, but won't display any boxes with pluses.

Any ideas?

2 Replies
MarcoWedel

you need to define the "Path Name" parameter in the hierarchy load which creates a field that contains the concatenated hierarchy level values seperated by a delimiter.

You then use this field in the listbox instead of your group (take care to define the same delimiter here).

The list box will display the full hierarchy instead of only two levels.

To display only levels 2 and 3 you could define an expression like

=SubField(PathName, '/', 2)&'/'&SubField(PathName, '/', 3)

The result could look like this:

QlikCommunity_Thread_117758_Pic1.JPG.jpg QlikCommunity_Thread_117758_Pic2.JPG.jpg

QlikCommunity_Thread_117758_Pic3.JPG.jpg QlikCommunity_Thread_117758_Pic4.JPG.jpg

hope this helps

regards

Marco

Not applicable
Author

Many thanks, Marco.  Looks like I got the fields to display correctly.  As a follow-up question, how do I get the List box to allow me to select a one of the groups (and all of its sub-segments)?  Right now I have to drill all the way down before I can select anything, and while I can lasso all of the items in a group, it would be preferable to be able to just select the group itself.