Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
happyjoshua777
Creator
Creator

QlikView for Devs chapter 9 Hierarchy example getting different results

I have followed this Hierarchy example and generated the following code:

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

...

HIERARCHY(Child_ID, Parent_ID, Child, ParentName, Child, Path, '-', HierarchyLevel)

LOAD Parent_ID,

     Child_ID,

     Parent,

     Child

FROM

(biff, embedded labels, table is Sheet1$);

However, when I execute it I get multiple table for each column as opposed to, as per p.323 of this book, hierarchical results within the same large table.

Does anyone know why I am getting this hierarchy on separate tables (see multi-table.png attached)?

4 Replies
engishfaque
Specialist III
Specialist III

Dear Happy,

Do you mean multiple fields?

Your shared script is fine. Please double check given below steps:

1. Add List Box and Select Field "Path" > List Box Properties > General Tab > Checked to check box "Show as TreeView" > Write - in With Separator > Apply > OK.

For mor, I am sharing you screenshot please have a look into.

Kind regards,

Ishfaque Ahmed

happyjoshua777
Creator
Creator
Author

I followed these steps, thanks.

Path Object did display as Hierarchy

However, as per my init. question, after following the Hierarchy wizard on p. 323 all objects were created in separate tables as opposed to one large table.

thanks

engishfaque
Specialist III
Specialist III

Dear Happy,

I think, you are actually adding List Box for all the available fields instead of Table Box. Therefore, you are not getting required output. So, remove all the fields from your Main Sheet and follow the given below steps.

I would suggest you to Add Table Box with all the available fields, and add Field "Path" two times one with Option "Show as TreeView" (Title: Tree View List Box) and one without "Show as TreeView" (Title: Normal List Box).

Kind regards,

Ishfaque Ahmed

happyjoshua777
Creator
Creator
Author

thank you

that resolved it. I added Path once though.