Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Tree Traversal in Script possible?

Hi everyone.

I have a tree structure, which I am using QlikView for analyzing (probably not the best choice, but no other is available right now). Now I have to calculate a measure (criticality) of each node. A simple post-order traversal of the tree would be sufficient.

However, I have no clue on how to implement this either as an expression, preferebly as table in the script.

Here is some sample data, which is distributed in two tables:

Line:

Line  StationA   StationB

A-B   A             B

B-C   B             C

B-D   B             D

C-E   C             E

D-G   D            G

E-F   E             F

Number:

StationB   Num

B             14

C             10

D             8

E             2

F             6

G            4

As Output I would like to have a table in this manner:

line    criticality

A-B     50 (20+18+12)

B-C     18  (10+8)

B-D    12   ...

C-E     8

D-G    4

E-F     6

I don't want to calculate them by hand, because the number of records is much larger. If there is not "easy" or "efficient" way to do this in QlikView I woud probably do it in R.

Thank you in advance for some advice.

Best Regards

Romana

0 Replies