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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
PurplePills555
Contributor III
Contributor III

How many customers are repeats within 12 months

Hi All,

I have a table of customer IDs and the date at which they visited. 

I need a graph on the front end that tells me each month how many repeat customers there have been within 12 months for that particular month.

Any ideas of how I can display this, it's like a rolling month problem.

For instance if I selected April 18 I would want to know how many in the 12 months prior to April 18 as a %.

Or June 19, how many repeats in the 12 months prior to that month.

How would I calculate this rolling problem according to what is selected in the front end or a graph that displays all months.

 

 

 

Labels (1)
3 Replies
mahaveerbiraj
Creator II
Creator II

Hi Purplepills,

I hope below expression helps you ,

Count(DISTINCT {<MonthYear= {'$(=Max(MonthYear))'},[Customer Id]= p({<MonthYear= {">=$(=<Max(MonthYear) -12 ) <= Max(MonthYear)"}>} [Customer Id])>} [Customer Id])

I dint check with syntax please correct the syntax if needed,

I will just explain the logic below  what I am trying above

i m checking current month customer are exist or not in last 12 moths using E() function  

Please feel free to reply if you have any doubt 

Thanks &  Regards 

Mahaveer  

 

 

PurplePills555
Contributor III
Contributor III
Author

Hi,

Sadly I couldn't get this to work. I just get 0. Not sure why!?

 

 

 

mahaveerbiraj
Creator II
Creator II

Could you please attach  QVF , so that I can check