Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am running hierarchy function on the resident table called DataTaxonomy_tmp3
Below the content of the table:
NodeDescription | NodeID | ParentID |
Client | 22 | |
Counterparty Country of Risk Name | 127 | 167 |
Exchange Price | 126 | 168 |
Markets | 168 | 21 |
Party | 167 | 22 |
Pricing | 21 | |
TestKDE3 | 128 | 169 |
TestKDE4 | 129 | 168 |
TestSubdomain3 | 169 | 22 |
TestSubdomain4 | 170 | 21 |
Script used for Hierarchy:
DataTaxonomy:
Hierarchy(NodeID, ParentID, NodeDescription,ParentName,Node,SelectionPath,,NodeDepth)
LOAD NodeID,
ParentID,
NodeDescription
RESIDENT DataTaxonomy_tmp3;
It seems to create the correct table apart from the fact that the path is not populated correctly and only consists of separators (last column), table below:
NodeDepth | NodeDescription | NodeDescription1 | NodeDescription2 | NodeDescription3 | NodeID | ParentID | ParentName | SelectionPath |
1 | Client | Client | 22 | |||||
1 | Pricing | Pricing | 21 | |||||
2 | Markets | Pricing | Markets | 168 | 21 | Pricing | / | |
2 | Party | Client | Party | 167 | 22 | Client | / | |
2 | TestSubdomain3 | Client | TestSubdomain3 | 169 | 22 | Client | / | |
2 | TestSubdomain4 | Pricing | TestSubdomain4 | 170 | 21 | Pricing | / | |
3 | Counterparty Country of Risk Name | Client | Party | Counterparty Country of Risk Name | 127 | 167 | Party | // |
3 | Exchange Price | Pricing | Markets | Exchange Price | 126 | 168 | Markets | // |
3 | TestKDE3 | Client | TestSubdomain3 | TestKDE3 | 128 | 169 | TestSubdomain3 | // |
3 | TestKDE4 | Pricing | Markets | TestKDE4 | 129 | 168 | Markets | // |
an anyone help and tell me what may be the reason for not populating the SelectionPath correctly?
Regards,
Paul
Hi,
tried this. Seems to work as well:
DataTaxonomy:
Hierarchy(NodeID, ParentID, NodeDescription,ParentName,NodeID,SelectionPath,,NodeDepth)
LOAD NodeID,
ParentID,
NodeDescription
FROM [http://community.qlik.com/thread/148510] (html, codepage is 1252, embedded labels, table is @1);
hope this helps
regards
Marco