# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for
Did you mean:
Highlighted
Contributor

## Retention rate/repeat customer

Hi!

I'm having some issues calculating customers with repeat purchases.

I have a table similar to this:

 Week CustomerId OrderId 5 200 1000 5 300 2000 6 400 3000 6 200 4000 7 300 5000 7 200 6000

How would I do to get a value of how many repeat customer purchases there are in week 7 for example? As you can see, CustomerId 200 and 300 are both recurring, so the value I'm looking for for week 7 would be "2" repeat customers.

I was thinking Set Analysis but can't get it to work, anyone have any ideas?

Best

/P

1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Retention rate/repeat customer

May be like this

Count(DISTINCT {<Week = {'\$(=Max(Week))'}, CustomerId = p({<Week = {"\$(='<' & Max(Week))"}>} CustomerId)>} CustomerId)

6 Replies
Highlighted

## Re: Retention rate/repeat customer

May be use

Count(CustomerId)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Contributor

## Re: Retention rate/repeat customer

Hi,

Sorry if I was unclear, but when selected only week  7 I would like to count if there is any previous orders by each customer

Highlighted
MVP

## Re: Retention rate/repeat customer

May be like this

Count(DISTINCT {<Week = {'\$(=Max(Week))'}, CustomerId = p({<Week = {"\$(='<' & Max(Week))"}>} CustomerId)>} CustomerId)

Highlighted
MVP

## Re: Retention rate/repeat customer

Based on selection in Week 6, I am getting only 1 repeat customer

Highlighted
Not applicable

## Re: Retention rate/repeat customer

hi,

how do you use the same formula to check how many repeats called in 24 hours, 48hours and 72 hours?

Highlighted
Contributor II

## Re: Retention rate/repeat customer

Do you know a way to do the same thing for consecutive giving years to find the retention rate for donors?