6 Replies Latest reply on Mar 25, 2019 7:41 AM by Robert Hoekstra

# CLV Calculation, revenue of first and second Purchase

Hey guys,

im trying to calculate the CLV (customer lifetime value) and for that, its important to know

1. when was the first, second, ... Purchase of a customer and also

2. the revenue of the first, second, ... Purchase

This is the data i have to calculate:

For 1.

first order:

second order:

But now i do not know how to get the revenue of the first and second purchase of customer 1 for example.

Now Tableau shows me the sum of all revenues per customer, if i turn the Measure into a dimension i get 3 Values but i only want the exact revenue of the first and second order.

I hope i described my problem understandable, if not just ask me please. I also attached my workbook.

Thanks,

Kay

• ###### 1. Re: CLV Calculation, revenue of first and second Purchase

Instead of using the field SUM(Revenue) in the label, drag it onto row shelf beside the 1.Order and 2.Order in both the places and change it from Continuous to Discrete and check.

Else you can create a calculated field for Revenue for first and second order, for ex as below:

Then drag it onto row shelf beside 1.Order and then convert the field as Discrete from Continuous as below:

1 of 1 people found this helpful
• ###### 2. Re: CLV Calculation, revenue of first and second Purchase

Hey,

same results if i put it onto row shelf and to discrete. It seems like tableau took the revenue's of the customer together if i fixe the customer id to get the revenue.

Because if i turn the revenue into a measure it looks like that:

but i just need the revenue of the first order for example and take that and calculate with that value u know?

EDIT: i didnt saw the pictures you put on your answer i think thats exactly what i need i will test it now.

• ###### 3. Re: CLV Calculation, revenue of first and second Purchase

Thanks man it worked,

but i have one question why did you put a sum before the if clauses?

• ###### 4. Re: CLV Calculation, revenue of first and second Purchase

Hi Kay,

Hope this helps

BR,

NB

1 of 1 people found this helpful
• ###### 5. Re: CLV Calculation, revenue of first and second Purchase

Hey,

i think i asked my question wrong, i wanted to ask is it necessary to use the function sum() there. Because it also works without it.

Thanks,

Kay

• ###### 6. Re: CLV Calculation, revenue of first and second Purchase

Hi,