2 Replies Latest reply: Apr 2, 2010 3:07 AM by badboy81 RSS

    Difficult Problem with Data row Comparison

      Hi,

      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?

      Thanks

      Kind regards,

      Herbert

        • Difficult Problem with Data row Comparison
          DANIEL CHOTZEN

          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.

          Examples:

          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

           

           

          Mansyno