Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Day to Everyone!
I want to calculate days between each purchase made by distinct customer.
I have 3 fields, Order ID, Customer ID, Order Date.
Order ID is unique field here
Example:
LOAD * INLINE [
Order ID|Customer ID|Order Date
1|1|18/04/2020
2|2|20/05/2020
3|2|23/05/2020
4|3|25/04/2020
5|3|27/05/2020
6|3|29/05/2020
7|4|01/06/2020
8|4|04/06/2020
](delimiter is |);
So what makes it difficult for me, some customers have made only 1 purchase, some have made 3 and some have made 2. I need to calculate days between purchases. Please advise how I can do that?
Try script as attached.
I've derived date diff by customer and overall date diff.
Try script as attached.
I've derived date diff by customer and overall date diff.