Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
alis2063
Creator III
Creator III

Identify the New customer based on Logic

Hi Guys,

I am looking for very good dynamic approach to fulfill the requirement 

I have a list of customers  including the invoice date so basically i want to build the KPI  for New Customer

and New Customer is the customer who has purchase something recently and second latest transaction would be happened  more the 60 days earlier then it would be considered as  'New Customer'

Below is Customers with Invoice Date,

CustomerDateCustomer Type
A22-01-2018New
A01-01-2019New
A05-01-2019New
A11-01-2019New
A21-07-2019New
B02-01-2019Existing
B21-01-2019Existing
B06-02-2019Existing
C27-12-2018Existing
C02-01-2019Existing
C05-01-2019Existing
C05-03-2019Existing

 

Something like that

For Customer A-

Max Date is 21-07-2019

Second  Latest Transaction is 11-01-2019

The diff of above date is >60

 

It should be dynamic  if i select month the further calculation can be done on the fly .

 

Regards,

Ali

 

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try expression like:

=Count(DISTINCT {<Customer={"=Max(Date)-Max(Date,2)>60"}>}Customer)

View solution in original post

11 Replies
alis2063
Creator III
Creator III
Author

@sunny_talwar  

please help on above issues.

tresesco
MVP
MVP

Do you want this in a chart? Could you share a sample app?

alis2063
Creator III
Creator III
Author

it will be reflect in KPI box New Customer.png as below,

 

tresesco
MVP
MVP

Try expression like:

=Count(DISTINCT {<Customer={"=Max(Date)-Max(Date,2)>60"}>}Customer)

alis2063
Creator III
Creator III
Author

Thanks for your solution  Tresesco.....

alis2063
Creator III
Creator III
Author

How it  does work using the below expression  as you took the customer in set analysis 

Customer={"=Max(Date)-Max(Date,2)>60"}

tresesco
MVP
MVP

It's like advanced search in listbox/on field. For every customer the condition is checked and counted the customers where the condition comes true. Hope this helps.

For better understanding learn set analysis in depth.

 

Please don't forget to close the thread by giving 'Like' and accepting solution.

 

alis2063
Creator III
Creator III
Author

Sure Tresesco ,

 

If  i select any date  from date filter it doesn't work any more......

tresesco
MVP
MVP

You are probably using extension objects I don't have, so I can't check it on your app. Could you explain your selection and explain expected output here?