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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
mansi_dv
Contributor
Contributor

Urgent Help needed

Hii all,

Attached is a sample of my application.

I need to do the following:

if a=b and c is not null, then check for the value of c in b and get the corresponding value in c. Continue till c is null. Get the final value of b in d. For eg, in the attachment,

a          b          c          d

1          1          c1

5          5         

2          y          c2

3          c1        c3

x          c3         

y          3           c5

z          4           c6

a=b=1, so we check the value of c ie 'c1' in b. Now, 'c1' in b corresponds to 'c3' in c. So we check 'c3' in b and find null in c.

Thus my desired out put is 'c3' in d.

How can we achieve this?

2 Replies
DavidFoster1
Specialist
Specialist

I think you need to break up the data more logically.

The first thing I would do is separate your A=B records into a separate table.

You then need to create a hierarchy table (I am assuming that there can be any number of levels before you reach a C=Null record.

The trick then will be to use the hierarchy table to lookup the Root node that applies to each record in your A=B table.

mansi_dv
Contributor
Contributor
Author

Thank you for the reply David. Yes, there can be any number of levels before c=null. Can you explain what is hierarchy table and how to use it?