Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
gauravgg
Partner - Creator
Partner - Creator

How to get Repeat customers and new Customers ?

I have the following tables

Cust_idTransaction_idAmountDate
1001100001/01/2016
200223111/01/2016
3003234202/01/2016
4004110020/01/2016

Cust_idCust_Name
1gaurav
2Anil
3Jack
4David

So the above two tables are linked with Cust_id

and these tables have data for 1 year

And the logic for Repeat and New Customer is,

Customer how has more than 1 transaction is the Repeat Customer (Transaction_id >1).

Customer who has only 1 transaction is a new customer (Transaction_id=1)

On the selected date i want the number of New Customer and Number of Repeat Customers

I also want which are the  Customer  Name in a table which are new and Repeat Customers

Basically i want count of New and Repeat Customers in KPI

and their details in the Report

Can anyone help me ?

Can we do this by Aggr() function ?

Thanks in Advance

1 Reply
sunny_talwar
MVP
MVP

May be something like this:

Repeat Customer

Count(DISTINCT {<Customer = {"=Count({<Date = {'<=$(=Date(Max(Date)))'}>}Transaction_id) > 1"}>} Customer)

New Customer

Count(DISTINCT {<Customer = {"=Count({<Date = {'<=$(=Date(Max(Date)))'}>}Transaction_id) = 1"}>} Customer)