# Calculating Customer Repurchase Rate



## jkancler (Jul 14, 2014)

I'm trying to calculate customer repurchase rate. HLINK is the unique customer ID and the Repurchase column signifies with a 1 that an HLINK has purchased more than once while zero indicates only one purchase. 

I've already created a measure to count the distinct HLINK's: =COUNTROWS(DISTINCT('repurchase'[HLINK]))

But I'm not sure what formula to use count the distinct HLINK's with a 1 in the Repurchase column. Here's the data set layout.



HLINKDateNetIntervalTimesTotalTimesRepurchase7395/18/2014 0:0025.89011013452/11/2014 0:0027.99011013665/31/2014 0:0055.96011013711/7/2014 0:0089.47015113711/20/2014 0:0095.981325113713/16/2014 0:0090.965535113715/18/2014 0:00128.046345113716/17/2014 0:006030551

<tbody>

</tbody>


----------



## jkancler (Jul 14, 2014)

Figured it out. Here's the formula: =countrows(filter(values(repurchase[HLINK]), calculate(countrows(values(repurchase[Times]))>1)))



jkancler said:


> I'm trying to calculate customer repurchase rate. HLINK is the unique customer ID and the Repurchase column signifies with a 1 that an HLINK has purchased more than once while zero indicates only one purchase.
> 
> I've already created a measure to count the distinct HLINK's: =COUNTROWS(DISTINCT('repurchase'[HLINK]))
> 
> ...


----------

