TransWikia.com

How to calculate date range constrained average Lifetime Value within Data Studio?

Data Science Asked on June 23, 2021

So within a data studio dashboard, I have a number of metrics e.g. Total Orders, Total Sales, Average order value etc. with YoY indicators as shown below:

enter image description here

And all the metrics are working fine with daterange control (as it would count distinct customer IDs which appeared in this date range as customers which is logically correct as well) except for LTV field. LTV is defined as "Total monetary value of customers averaged over all customers considered". So I calculated it over here as SUM(usd_shipped)/COUNTD(user_id).

So for a specified date range logical definition would be: All time $ Shipped of all customers who placed order(s) in this date range / Number of unique customers who placed orders in this date range.

However the way Data Studio filters work, Its calculating Total $ Shipped during this date range / Number of unique customers who placed orders in this date range which is logically a whole different metric usually called average customer value.

So how can I get LTV value to be calculated correctly using date range. Current work around is to have a separate query and have date range as parameters to calculate LTV via SQL. But how can it be done in Data Studio itself so I can have YoY metrics as well as a simple clean table connection?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP