Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Average Days between Orders

$
0
0

 

Hi

I'm trying to make a measure that shows the average days between orders from a specific Customer plus another measure that shows the average days between the orders of a specific Product from each Customer.

 

Below is the example where i have typed in the days manually, which is basically just a datediff.

Ex. Cust A order Product A for the first time on 01-01-2016. 60 Days later the same customer orders again, while the same Customer orders the same product 83 later.

Capture.PNG

 

Eventuelly the output should show that for example

Cust A is ordering Product A on average every 83 Days (2 Orders)

Cust A is ordering Product B on average every 32,5 Days (3 Order)

Cust A is ordering on average 31,25 Days (5 Order)

 

I can get these to the number by calculating the differences in SQL, but i would like to keep it in DAX

 

Thanks in advance


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>