Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
wizardo
Creator III
Creator III

Hierarchy with more the one qualifing fields, eg "node/parant namas" and "node/parant color" and more

hi

i know the hierarchy Keyword can accept a table with 4 fields

node_ID

node_Name

Parent_ID

Parent_NAME

(there are place holder for each of these in the format of the HIERARCHY Keyword)

and it creates a table where each level found in the first table manifests as 2 field in the new table

level_ID

level_NAME

but what if i have more attributes for the node and the parent?

for example if i also want to keep the color of each node and each parent

and the size of each

etc etc ....

if i do the link after the HIERARCHY created the new table, then id have to create a table for each of the levels (using the "depth" parameter probably)

but this is kinda cumbersome.

i thought about concatenating the attributes to the NAME attribute, in one long string and then after the HIERARCHY command i would load resident and parse it back to fields

but that's even more cumbersome 🙂

it might be done tho by using some kind of scripted loop.

so i thought before plunging into some complex scripting and variable creating maybe some one in the community had tackled this problem before

thanks for at least reading this far 🙂

Mansyno

P.S.

i am totaly aware of the posibility that i just missed somthing and the solution is in a snap

my wife says my 3D space orientation vision is flowed seriously

so is my grammar for sure.

EDIT:

a correction: the hierarchy command accepts 3 fields an not 4

node_ID

node_Name

Parent_ID

it calculates the 4th paramter (Parent_Name) from the node_Name

problem is it only knows how to calculate the names, but not other attributes too (that's the problem).

3 Replies
Not applicable

Hi Wizardo

The times I have used a hierarchy table, I had a dimension table linked to the Node ID and kept data related to the node there - colour, size etc. I would suggest doing that instead of changing the hierarchy table.

wizardo
Creator III
Creator III
Author

hi Jeanne

i agree, when you just have fields already in the data (like company, product_category, agent, year, month etc....) then no use of using the hierarchy command and one can use your method and needs only to put them on same object on the layout or in a group and have the user interact with their order.

the party starts when your source is what is known as adjacent node table

where each line has the node_ID and the Parent_ID together with their names

this is exactly the structure that the Hierarchy command awaits. hence the mentioning of this method

but like i said in the original post, even this method doesn't help, if you have the kind of structure where each node can have multiple parents and it has different attributes per each parent it belongs to.

hope i clarified the matter:)

Mansyno

wizardo
Creator III
Creator III
Author

no answers means no one has any ideas? or it means only those without ideas read the post? 🙂

Mansyno