Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
have the following table:
I am using function HIERARCHYBELONGSTO() which gives me correct result all parents of current item,
but how to do the same for Childs item?
your challenge is when a node is selected, you want to list down all the nodes under it (direct and indirect children?)
when done properly, you can select the parent and all children will be possible selections:
without selection:
select America:
HierarchyBelongsTo (NodeID, ParentID, Name, ParentID, ParentName, DepthDiff) LOAD * inline [
NodeID, ParentID, Name
1,,World
20,1,America
79,20, US
85,79, California
90,85,Napa Valley
178,1,Europe
281,178, France
283,281, Bordeaux
];
hi @Micki , i recommend you take a look to the Hierarchy wizard
just recreate your table into a excel or something, to test this wizard :
its apperas at the third 'Next'
@Micki "A have child B and B child C, C child C" is not circular. if you have specific samples just post it (pls not a picture)
here is the doc for the function its very straight forward:
HierarchyBelongsTo ‒ QlikView
unless you consider C child C as circular. note that DepthDiff = 0 is the scenario you may be thinking of. just exclude that
@edwin , sorry my bad should be "A has child B , B has child C, so A has child C"
@Micki that is still not circular. that is more like a grandchild. the DepthDiff will identify those. are you saying you just need direct children? use DepthDiff=1
if the object is to find the Children of a node, use DepthDiff=1:
for America you get US from above.