Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
NargizJaf
Regular Visitor

Time Travel in Power BI

Hi! How can I calculate the following metrics to get the needed results? I have to calculate Average Customer Lifespan, Average Lifetime Value and Customer Retention Rate so that I can "travel in time". I will have to show these metrics by months. From the beginning of the record period by the end of the specific month. For example, ACL for January 2023 contain the results from the very beginning by the end of January 2023, etc.

Average Customer Lifespan = Average of (Max Purchase Date – Min Purchase Date) per customer
Average Lifetime Value = Average Revenue per customer * Average Customer Lifespan
CRR = (Number of customers at the end of the period-Number of new customers)/Number of customers at the start of the period

I have a Sales Table which has these columns: customer ID, purchase date, product name, transaction code, product price, loyalty card number etc. If a customer buys several products within one transaction, there are 3 rows in the table. Also, I have created Dim Table from the Sales table with the following formula
DimDate = CALENDAR(MINX(SALES,SALES[SALES_DATE]),MAXX(SALES,SALES[SALES_DATE]))

I guess if I can create virtual table inside Sales Table, I will be able “travel back in time” or in another words by filtering the DimTable dates I will be able to go back in time to see results of the previous months/years.
How can I do that?

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.