I'm relatively new to qlik sense, and I'm tasked with creating an application that will allow the user to see the hierarchy of people directly rattached to him, but with numbers aggregated within all the children of this hierarchy.
To simplify, I've tried creating a minimal example with a sample hierarchy. The hierarchy is defined as follow:
I've generated a simple load script that loads this data into a hierarchy model for unbalanced n-level hierarchy. (took from this document).
[Nodes]: Hierarchy(User_Id, Manager_Id, Node, NodeParent, Node, NodePath, '/', NodeDepth) load User_Id, managerId as Manager_Id, name as Node resident Organization;
[TreeBridge]: HierarchyBelongsTo (User_Id, Manager_Id, NodeName, TreeId, TreeName) LOAD User_Id, managerId as Manager_Id, name as NodeName Resident Organization;
[Trees]: Hierarchy(TreeId, TreeParentId, Tree) Load User_Id as TreeId, managerId as TreeParentId, name as Tree Resident Organization;
Now, the issue is, I'm trying to, for now, add it to a "cross table" in order to have the drill-down behavior, and simply counting a distinct of the User_Id. I'm adding Node1-4 as the dimension, and remove null values for all.
It seem to work at first, as you can see:
But once I start opening a few more path of the hierarchy, it "breaks" and most of the data is deleted, only showing one branch of the hierarchy tree.
I'm not sure whether this is a bug or something that I'm doing that is utterly wrong?
That behaviour is caused when you suppress the null values because when a column has a null value the whole row is suppressed. Take Node 4 for instance, it's all nulls except for Buckminster Shelton so when you expand all the way to node 4 all the other rows are suppressed leaving you with one (the tree for Shelton).