Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Nocto
Contributor III
Contributor III

How can I solve this Puzzle with an If statement (Getting identical Key Field from Entry No and closed by Entry No)

Hey Guys,

so my Problem is this:

I have here an inline Code:

LOAD * INLINE [
Entry No, Customer No_, Posting Date, Document Type, Document No_, Due Date, Closed by Entry_ NO_, Closed at Date

3986, D17000001, 2011-01-05 00:00:00.000, 1, 121_GH, 2011-01-05 00:00:00.000, 264, 2011-01-05 00:00:00.000
264, D17000001, 2010-12-31 00:00:00.000, 3, X34, 2010-12-13 00:00:00.000, 6415, 2011-01-05 00:00:00.000
6415, D17000001, 2011-01-05 00:00:00.000, 6, 121_GH, 2011-01-05 00:00:00.000, 0, 1753-01-01 00:00:00.000
];

 

Here you can see  an Example of an Dataset.  all of this this Three Datasets are connected to each other by Closed by Entry_No and Entry No_.

SO if we are looking at entry No 3986 it was closed by 264 and 264 was closed by 6415 and 6415 is the last one in this chain because Closed by entry no is Zero.

What I am looking for is a way to give them all a the Entry No. 3986 because the Chain starts with 3986. So when a User clicks at the "KEY" Field, See User can see the whole chain.

I hope this Explanation was unterstandable.

Thanks 🙂

1 Reply
mikaelsc
Specialist
Specialist

something with hierarchies? 

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

and calculate the max depth ancestor per record in order to determine the chain?