21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

to transform an adjacent nodes table to an expanded nodes table. See Hierarchy (page 236) for more information.<br />

A problem with the expanded nodes table is that it is not easy to use the level fields for searches or selections,<br />

since a prior knowledge is needed about which level to search or select in. The ancestors table is a different<br />

representation that solves this problem. This representation is also called a bridge table.<br />

The ancestors table contains one record for every child-ancestor relation found in the data. It contains keys<br />

and names for the children as well as for the ancestors. I.e. every record describes which node a specific node<br />

belongs to. The hierarchybelongsto keyword can be used in the <strong>QlikView</strong> script to transform an adjacent<br />

nodes table to an ancestors table. See Hierarchy Parameters (page 214) for more information.<br />

A good <strong>QlikView</strong> solution for a hierarchy needs both an expanded nodes table and an ancestors table. The<br />

former is needed to create pivot tables and generally describe the nodes; the latter to allow selection of<br />

entire trees. The two are linked through the node key, e.g. NodeID, which also links to a possible transaction<br />

table.<br />

381

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!