7 Replies Latest reply on Oct 30, 2018 11:01 AM by Tony Fahd

# How to identify customers who purchase the same item within a time period?

Hi, I am attaching a workbook where I like to identify customers who purchased the same item within a time period. i have a million customers in my data. so for example customer A purchase a  car 3 times. i want o to bale to tell how many times they purchase the car and what is the time frame. so their initial purchase was in 12/1/17, i want to use this date as reference and identify the other purchases of the car 1/1/18 and 2/3/18 as repurchases and want to see how many days in between the repurchases and the initial one. same thing for my customer B, their initial purchase is a boat on 1/1/18 and they repurchased the boat on 2/3/18. They also purchased the care twice

i don't care about the truck purchase of my customer A since they bought it only once. i like to have a view where the purchase is my main field and next to that field i like to see the number of repurchases by customer.

Thanks a lot for the help.

Tony

• ###### 1. Re: How to identify customers who purchase the same item within a time period?

Like this?

• ###### 2. Re: How to identify customers who purchase the same item within a time period?

Hi Tony,

To achieve this I created a second date field to derive the minimum purchase date for that customer - if you want this to be by vehicle, then just add the [purchase1] field to the equation before the colon

I then created a second calculation to derive how many months it was between the initial purchase and the second (and third) purchases. To change this to years or days, just replace the 'month' with whatever level of measurement you need.

HTH 18.2 attached

Peter

1 of 1 people found this helpful
• ###### 3. Re: How to identify customers who purchase the same item within a time period?

Thanks Peter, I couldn't download the workbook because it says it wasn't fully uploaded.can you upload again?

• ###### 4. Re: How to identify customers who purchase the same item within a time period?

Yes! can you share the workbook?

also can I put the purchase in front customer?

• ###### 5. Re: How to identify customers who purchase the same item within a time period?

Hi, please see attached.

Initail Order Date:

{ FIXED [Customer1], [Purchase1]:

MIN([Date1])}

# of Purchase (s):

{ FIXED [Customer1], [Purchase1]: COUNT([Purchase1])}

Repurchase:

[# of Purchase (s)]-1

2 of 2 people found this helpful
• ###### 6. Re: How to identify customers who purchase the same item within a time period?

I am very sorry Joy. your tableau version is newer than mine so i couldn't open the file. do you mind taking screenshots of the functions you created? thanks a lot for the help

• ###### 7. Re: How to identify customers who purchase the same item within a time period?

Joy , this is amazing!one last question what about if i want to show the purchase as the main field and next to it the number of purchases, number of repurchases and repurchase rate like below and only look at the repurchases that happened within 90 days of initial purchase: