Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the data of Parent and children hierarchy. I have parent and children two columns are there. I have to create the report like below. I am providing the sample data for reference and output for reference.
In sample data I am providing 6 levels of children. In original data levels may increase . Please check and provide the solution to me.
Hi All,
I have the data of Parent and children hierarchy. I have parent and children two columns are there. I have to create the report like below. I am providing the sample data for reference and output for reference.
need to find top parent (Parent should have only children and not having parent to that).
As per data we dint know how many children levels are there for that top parent. Need to find the children's levels dynamical and show the count of all children levels to that top parent.
In sample data I am providing 6 levels of children. In original data levels may increase . Please check and provide the solution to me.
Thanks,
Pavan
Hi,
Add two rows in your data for A and F and include them in a child field, keep the parent field blank.
Use below script.
HierarchyBelongsTo(Children,Parent,Name,Parent,ParentName,Depth)
LOAD Parent,
Children,
Children as Name
FROM
[C:\Users\Kaushik\Downloads\Demo_Data.xlsx]
(ooxml, embedded labels, table is Test);
See the attachment.
Hi Kaushik,
Thanks for your reply
I cant include top parent in children list. I have more than 3 millions of data in original table. I am looking for only top parent and it 's children level count.
Kaushik is spot on I believe, here is a Design Blog post as well, if this does not work, I am not sure it can be done.
https://community.qlik.com/t5/Qlik-Design-Blog/Unbalanced-n-level-hierarchies/ba-p/1474325
Regards,
Brett