Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Difficult Problem with Data row Comparison


Description: I need help in a telephone scenario. Problem I would like to know with telephone Nr. has transfered the call to which IP-Adress.

Fields: (table sortet by %GlobalID and Starttimestamp asc.)
%GlobalID ==> to get the combined calls
Nr ==> Autonumber Field
StartTimestamp ==> Timestamp for Call
IngressIP ==> IP of the Calling Party
EgressIP ==> IP of the Called Party
TransferNr ==> TelephoneNr of the Party who transfered a call

In the line where there is an entry with a TransferNr, that says the call between these 2 IPs was transfered from this telephoneNr. ==> Problem ==> but I don't know to which person the
call was transfered ==> to the IngressIP or the EgressIP ==> they could change position ==> I can get these by comparing line with the TransferNr <> '' with the line above, and I must
compare it with the row ==> IngressIP (where TransferNr <> '') = IngressIP (above line) or IngressIP (where TransferNr <> '') = EgressIP (above line)
and the same with the EgressIP ==> also comparing it with the above IngressIP and EgressIP.

Result for the New Field "Comparison" should be an entry for example: if the IngressIP is the same as above than 'I' or if the EgressIP is the same than 'E'.

I hope somebody could give me a solution for my problem? The topic is complicated but maybe there exists a solution?


Kind regards,


2 Replies
Contributor III

Difficult Problem with Data row Comparison

hi there

with out really looking deep in to the specifics situation you describe, it sounds like a solution can be find with the qlikview's

Inter record functions

one in particular comes to mine , the previous() function: (from the internal help)

previous(expression )

Returns the value of expression using data from the previous input record that was not discarded due to a where clause. In the first record of an input table the function will return NULL. The previous function may be nested in order to access records further back. Data are fetched directly from the input source, making it possible to refer also to fields which have not been loaded into QlikView, i.e. even if they have not been stored in its associative database.


Load *, Sales / previous(Sales) as Increase from ...;

Load A, previous(previous( A )) as B from ...;

or one of other functions from this family:

peek(), fieldvalue(), lookup() etc

hope that helped some


Not applicable

Difficult Problem with Data row Comparison


Thanks for the idea with the Inter-Record Functions. I will take a look at these functions if I can find a solution there, I will come back to report here.



Community Browser