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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jr3151006
Helper IV
Helper IV

Previsibility for new purchases - based on last orders

Hi,

 

we need reach a 'previsibility' of new ordes for next week, reviewing last 02 or 03 orders to get a previsibility of 'WHEN' customer will buy again. Based on that previsibility we would like to start CRM actions for cases where would be expected a new order for yesterday (for example) but not realized...

 

Let´s say that looking sales table, we realize that 'Customer A' bought on '01/01/2018', '21/01/2018' and 10/02/2018 so the average time (we need calc) for new order is '20 days'. After that we can expect 'customer A' buying again on '02/03/2018'.

 

 There is DAX formula to check this interval based on last dates of purchase and calc this average?

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @jr3151006,

 

I'm wondering if you could firstly create two measures to get the last order date, the first order date of the last 02 or 03 orders for a customer. (In order to do it, you may need to rank the order dates for each custom first.)

 

Then use DATEDIFF function to create a new measure to calculate the average days that a customer will order again. Smiley Happy

Measure = DATEDIFF ( [First Order Date], [Last Order Date], DAY ) / 2 --Divided by the value according to your needs

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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