Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Nisha_Pra
Contributor
Contributor

Repeat Customer Logic in Qlik View Scripting

Hi All,

Repeat Caller Logic within 48 hours . (Repeat caller duration is based on callstartdate and prevcallsegstartdate  as per the example provided)

Formula: Numerator - Unique Contact, Denominator - Unique + Repeat Contact

CustomerPhoneCallIDCallstartdateCallenddateprevcallstartdaterepeatcalldurationSecs
123Call12020-06-08 11:13:05.0002020-06-08 11:28:48.000NULLNULL
123Call22020-06-08 11:39:35.0002020-06-08 11:50:23.0002020-06-08 11:13:05.0001590
123Call32020-06-11 15:24:07.0002020-06-11 15:33:56.0002020-06-08 11:39:35.000272672
126Call122020-03-22 14:40:49.0002020-03-22 15:09:42.000NULLNULL

From the above example -  In the case of 123 phone number (1-2 row number) - its a repeat contact.
This customer contacted twice within 48 hours based on the first two rows

Now in the numerator - it should be 0
in the denominator - it should be 2

3rd row - again the same customer contacted after 48 hours, it should treat as a new customer
Now numerator - 1 and denominator - 1

In case of 126 customer phone number - its unique contact
Now numerator - 1
denominator - 1

Total KPI value - Numerator - 0+1+1
Denominator - 2+1+1

Can someone help me how I can achieve this in Qlik?

Labels (1)
2 Replies
Brett_Bleess
Former Employee
Former Employee

I believe you are going to need to provide some further clarification of the use case and I would segregate your actual input data and your expected/desired output, so it is clear to folks what exactly you are trying to accomplish, believe that is likely why you have not received any responses, as it is a bit unclear to me exactly how you are trying to go about things given some of the commentary does not really seem to tie into the data you provided.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Brett_Bleess
Former Employee
Former Employee

See duplicate post: https://community.qlik.com/t5/New-to-QlikView/Identifying-Repeat-and-Unique-Customers/m-p/1733790#M3...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.