Forum Discussion
Average LTV Measure
Hi all,
I'm trying to create a measure that returns the average LTV for all customers in table.
The table has individual product purchases for rows, so I want to add up all the instances of a product purchased's sales for that customer.
| CustomerID | Sales |
| 1 | 4158 |
| 2 | 17155 |
| 2 | 17155 |
| 2 | 17155 |
| 2 | 17155 |
| 2 | 18018 |
| 2 | 520 |
| 3 | 5709 |
| 3 | 5709 |
| 3 | 17655 |
| 3 | 17655 |
If I was doing this on Excel, I would create a SUMIF looking at the CustomerID column, matching CustomerID with the ID I want to sum first, then select the Sales column. Drag down to SUMIF all customers, then just select them all and look at the average on the bottom of Excel.
I found a couple of CALCULATE and SUMX formulas online that check for some specific expression, but the expression I've tried isn't working when I'm trying to recall CustomerID.
Ex.
RyanNewportJP First create a measure for Total Sales per Customer
TotalSalesPerCustomer =
SUMX(
VALUES(Table[CustomerID]),
CALCULATE(SUM(Table[Sales]))
)Then create a measure for Average LTV
AverageLTV =
AVERAGEX(
VALUES(Table[CustomerID]),
[TotalSalesPerCustomer]
)
3 Replies
- bhanu_gautamSuper User
RyanNewportJP First create a measure for Total Sales per Customer
TotalSalesPerCustomer =
SUMX(
VALUES(Table[CustomerID]),
CALCULATE(SUM(Table[Sales]))
)Then create a measure for Average LTV
AverageLTV =
AVERAGEX(
VALUES(Table[CustomerID]),
[TotalSalesPerCustomer]
)- RyanNewportJPFrequent Visitor
Thank you very much! This worked!
Can I ask why it works?
- CamdenWalkerNew Member
It helped me also, Thank you so much.
SpoilerTo calculate the average customer lifetime value (LTV) in Power BI, you'll want to first summarize the sales for each customer by grouping the data based on the CustomerID. Once you have the total sales per customer, you can then calculate the average of these total sales across all customers. This approach ensures you are considering each customer's cumulative spending before calculating the overall average. I had a tough essay assignment on a topic I wasn’t familiar with, so I decided to seek professional help. After researching online, I came across Academized which we can find here https://academized.com/custom-essay and decided to try their custom essay service. I was impressed by how fast the process was and how well the essay was written. It was well-structured, coherent, and free from any errors. The writer clearly put a lot of effort into it, and it helped me score better than I expected!