3 Replies Latest reply on Mar 2, 2016 4:51 AM by Mark Fraser

# Retained customers from last year compared to the total number of customers the year before

Hi Community,
I am struggling with a calculation regarding retained customers from last year compared to the total number of customers the year before.

Basically I would like to find sum of customers who were shopping at my shop last year and this year / total number of customers at my shop this year.

Thus;
2011: 100 customers are shopping in 2011

2012: how many of the 100 customers who were shopping in 2011 does also shop in 2012.

in 2012 there are a total of 120 customers (new and from 2011).

2013: How many of the 120 who were shopping in 2012 does also shop in 2013?

Any ideas about how to solve this?

• ###### 1. Re: Retained customers from last year compared to the total number of customers the year before

Hi Rasmus

I ask because LOD calculations (which are only available from v9) may help

Your question, reminded me of Number 10 >> Top 15 LOD Expressions | Tableau Software

It will require some changing, but may give you what you need.

If not, or your still stuck, some (fake) sample data to show your situation would be helpful

Cheers

Mark

• ###### 2. Re: Retained customers from last year compared to the total number of customers the year before

Thanks Mark,

I have v9, but I think my question is a little bit different from the case

in the article though..

I have attached mock up data, consisting of just customer id and date of

purchase.

Thus the result I am looking would in this case be 66,7% in 2011 and 50 %

in 2012.

Cheers

• ###### 3. Re: Retained customers from last year compared to the total number of customers the year before

Hi Rasmus

Thanks for the sample data, I see what you mean now.

I will take a look for you, I'm sure its possible.

Cheers

Mark