Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Specialist II
Specialist II

you can find in table also

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

Not applicable
Author

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
Author

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
Specialist II
Specialist II

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)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!