Frequent Visitor
Posts: 13
Registered: ‎01-25-2018

Returning customers over years


I have a set of data with sales from customers. What I want to know is how long do new customers stay at my organisation? So if they buy for the first time in 2013. Do they buy also in 2014? And in 2015? So my solution should look like:


YearNew customersActive after 1 yearActive after 2 yearsActive after 3 years


My data is a fact Sales with dim Customers and dim Datetable. In fact sales I have transactiondate, amount, sales and keys to dim tables.


Thank you for your help!

Jarno Visser

Super User
Posts: 10,508
Registered: ‎07-11-2015

Re: Returning customers over years

Source data would really, really help here. Please see this post regarding How to Get Your Question Answered Quickly:


But, that being said, you sould be able to use a variation of my Not In Common Quick Measure to find customers in a particular year that are not present in the years before.


That would solve New Customers. After that, it should be a relatively simple matter to compute the MAX order date for each customer and determine if they are active after a length of time.


Very interesting case and would love to spend some cycles on it but too much work to hand enter a bunch of data in the wrong format such that it doesn't translate directly to a solution for you.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Frequent Visitor
Posts: 13
Registered: ‎01-25-2018

Re: Returning customers over years

Hi Greg,


Here is a file with data from my fact table:

The dim table customers you could create with values(customerid).


Hope you can help me!