Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Naren123
Contributor
Contributor

how to show number of repeated customers in each period using set analysis

 

I need to find number of repeated customers who made transaction more than once in a given period.

scenario 1:

if i select the month it should show the number of customers who made transaction more than once in the selected month.(which should not consider the customer entry as 2 if he had  made transaction in the previous month, it should count the entry as 1 if particular customer repeats from previous month to selected month)

scenario 2:

if i select the quarter it should show the number of customers who made transaction more than once in the selected quarter.

scenario 3:

if i select the year it should show the number of customers who made transaction more than once in the selected year.

Note: i have period filter which will pass the date range accordingly based on the selection(month,quarter,year)

i am using fields: Customer code, Doc_date

Please help in this regard, 

Labels (3)
12 Replies
Channa
Specialist III
Specialist III

yes it is showing 4 for jan because Customer 1 exist in both Jan and Feb .so customer one will be counted for Jan and Feb

similar for other months

 

you need to change expression to the table it will not work with same expression..

Channa
Naren123
Contributor
Contributor
Author

Thanks for the inputs,

as requested please find the source excel in the attachment.

requesting to help with the expression to show the count in table month wise

Channa
Specialist III
Specialist III

 

 


LOAD *
WHERE cDate > 1
;
LOAD Month as cMonth,customer_id as ccustomer,return_flag as cflag, count(Date) as cDate
RESIDENT Test
GROUP BY Month,customer_id,return_flag
;

 

you need to add this to script

please find the attached qvf ..second tab you have the list by month

Channa