Not sure if this is possible, but what I need to do is calculate a retention % based on previous purchases per unique customer
I have a fact table (fSales) that includes customer_id, campaign_id, billing_cycle for each row of data.
If customer =1 ,purchased campaign_id=200, on billing_cycle=0 and then customer =1 ,purchased campaign_id=200, on billing_cycle=1 how to i calculate that in a measure?
Each purchase is on a seperate row and I need to tie the unique customer_ids together. I should mention, each row also has a column of acquisition_date which is different from date_of_sale.
I want to be able to calculate the retention by period as well. So for all customers who purchased in september what is the retention rate as of today.
Ideally, I want to do something like this: