Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

gauravgg
New Contributor III

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
MVP
MVP

Re: How to get Repeat customers and new Customers ?

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)

Community Browser