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.
[TABLE="width: 548"]
<tbody>[TR]
[TD]HLINK[/TD]
[TD]Date[/TD]
[TD]Net[/TD]
[TD]Interval[/TD]
[TD]Times[/TD]
[TD]TotalTimes[/TD]
[TD]Repurchase[/TD]
[/TR]
[TR]
[TD="align: right"]739[/TD]
[TD="align: right"]5/18/2014 0:00[/TD]
[TD="align: right"]25.89[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1345[/TD]
[TD="align: right"]2/11/2014 0:00[/TD]
[TD="align: right"]27.99[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1366[/TD]
[TD="align: right"]5/31/2014 0:00[/TD]
[TD="align: right"]55.96[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]1/7/2014 0:00[/TD]
[TD="align: right"]89.47[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]1/20/2014 0:00[/TD]
[TD="align: right"]95.98[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]3/16/2014 0:00[/TD]
[TD="align: right"]90.96[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]5/18/2014 0:00[/TD]
[TD="align: right"]128.04[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]6/17/2014 0:00[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
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.
[TABLE="width: 548"]
<tbody>[TR]
[TD]HLINK[/TD]
[TD]Date[/TD]
[TD]Net[/TD]
[TD]Interval[/TD]
[TD]Times[/TD]
[TD]TotalTimes[/TD]
[TD]Repurchase[/TD]
[/TR]
[TR]
[TD="align: right"]739[/TD]
[TD="align: right"]5/18/2014 0:00[/TD]
[TD="align: right"]25.89[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1345[/TD]
[TD="align: right"]2/11/2014 0:00[/TD]
[TD="align: right"]27.99[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1366[/TD]
[TD="align: right"]5/31/2014 0:00[/TD]
[TD="align: right"]55.96[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]1/7/2014 0:00[/TD]
[TD="align: right"]89.47[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]1/20/2014 0:00[/TD]
[TD="align: right"]95.98[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]3/16/2014 0:00[/TD]
[TD="align: right"]90.96[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]5/18/2014 0:00[/TD]
[TD="align: right"]128.04[/TD]
[TD="align: right"]63[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1371[/TD]
[TD="align: right"]6/17/2014 0:00[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]