Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
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.
arjanijlenhave
New Contributor

Second connection

Hi all,

I'm making a dashboard on a telephone database. One of the KPI's is the time between throughconnect and answering.

I give an example:

Event description:

INIT = Inbound Call

CON = Connection (Asnwering)

INT = Throughconnect

DIS = Disconnected (Hangup)

Call IDRecNoEventCodeEventTime
1231INIT12:01:53
1232CON12:02:06
1233INT12:02:15
1234CON12:02:23
1235INT12:02:30
1236CON12:02:45
1237DIS12:03:01

Now I need a set with the time of the second CON-event per CallId that is after the first INT. I hope someone knows how to do......

Best regards,

Arjan

Message was edited by: arjanijlenhave

1 Solution

Accepted Solutions

Second connection

Hi,

     For this you have to arrive value in the load script.

     Load the data by using order by callID , EventCode,EventTime in ascending order.

     Then

     Load

          *,

          Autonumber(EventCode&EventTime,CallID&EventCode) as Number

     Resident tableName;

Then you can easily picked up based on the number.

     Interval(Only({EventCode={'CON'},Number={2}} EventTime)-Only({<EventCode={'INT'},Number={1}>} EventTime),'hh:mm:ss')

Hope it helps

Celambarasan

4 Replies

Second connection

Hi,

     Have CallID as dimension.

     Interval(Max({EventCode={'CON'}} EventTime)-Only({<EventCode={'INT'}>} EventTime),'hh:mm:ss') as expression

Hope it helps

Celambarasan

arjanijlenhave
New Contributor

Second connection

Hi Celambarason,

Thanks for helping!

I've edited my discussion....How to do now?

Arjan

Second connection

Hi,

     For this you have to arrive value in the load script.

     Load the data by using order by callID , EventCode,EventTime in ascending order.

     Then

     Load

          *,

          Autonumber(EventCode&EventTime,CallID&EventCode) as Number

     Resident tableName;

Then you can easily picked up based on the number.

     Interval(Only({EventCode={'CON'},Number={2}} EventTime)-Only({<EventCode={'INT'},Number={1}>} EventTime),'hh:mm:ss')

Hope it helps

Celambarasan

arjanijlenhave
New Contributor

Second connection

Thanks for your help!!!

Arjan

Community Browser