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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Hierarchy

Hello everyone i have a problem and i want to now if someone can help me.

i have a table with this fields: SonID and ParentID these are production parts and i want to know how many sons a parent can have so i used Hierarchy and at first seems to work fine but only worked for some ParentID numbers but not for all of them, heres an example of the data i get from an SQL table

so, what im trying to do is if a SonID shows also as ParetID get that ParentID's SonID and put it as a new level like this

as you can see i found the SonID(9) in the ParentID column and create a new leve with that Parent's SonID, and also a SonID can at a time convert into a Parent and give place to multiple levels like this:

you can have any number of sons and any number of levels.

i apreciate your help in advance and hope that theres a way to do this, also i have the general idea of how to do this with For sentence but i find it hard to realize how to use it in QlikView if anyone knows how can i do this with For sentence ill apreciate as well

thanks

0 Replies