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.
Not applicable

To Calculate Repeated Calls

Hi,

I actually want to calculate the serial no which are repeated. I do not have a repeat flag, I need to create a repeat flag in the back end/script to calculate the repeat calls, I am unable to do the count function in the script to calculate the repeat calls. Can someone help on this issue?????

5 Replies
sivarajs
Valued Contributor II

Re: To Calculate Repeated Calls

you can find in table also

use something like sum(aggr(if(count(FieldA)>1,1,0),FieldB))

Not applicable

Re: To Calculate Repeated Calls

Hi,

Thanks for ur response. Actually i do not have 2 different fields. I have one field serial no . I want to calculate the serial no repeated in the backend because i want to categorize this like

for eg:

if once repeated as spare call

2nd repeated as additional spare

3rd time non spare etc.

Is it possible to do could u pls help on the same??

Not applicable

Re: To Calculate Repeated Calls

hi,

thanks for the response,

I do not 2 fields here to calculate, I have only 1 field  serial no. I need to write this in backend because i need to calculate the ratio of repeated calls. I want something like this

if call is repeated for first time- 'Spare'

if call is repeated for second time- additional spare

if call is repeated for third time- it is a non spare

can u pls help me on this???

sivarajs
Valued Contributor II

Re: To Calculate Repeated Calls

Try this example

Load *,if(Previous(SerialNo)=SerialNo,1,RangeSum(1,peek(flag))) as flag  ;

LOAD * Inline [

SerialNo

1

2

3

2

1

1

];

Then in front end create a staight table

Add dimension as your serial no and expression as count(flag)

Re: To Calculate Repeated Calls

Hi,

     You can create a new table which will have the Serial number and its occurance count.

     So the script will be.

     Load Distinct Serial_No,count(Serial_No) as Count

     From xyz

     Group by Serial_No.

Regards,

Kaushik Solanki

Community Browser