Feb 10 2024 03:26 PM
Feb 10 2024 04:04 PM
I'm afraid it is more of a model question rather than a simple formula. The problem is not a one formula thing. I assume you want to calculate average gap (in days) between consecutive orders of the same item. In this case you will have to get a unique list of items. Then for each item you need to list consecutive sale dates and calculate the difference between each. After that apply average on top of your calculated differences.
Some functions you could use: UNIQUE(), AVERAGE(), SUM(), SUMIF(), SUMIFS(). I would also advise you to learn how to use pivot tables as they can become really handy for this and similiar scenarios.
Feb 10 2024 04:46 PM
Thank you for responding! Your assumption is correct. The data set was created and sorted using the UNIQUE-SORT function. I am familiar with pivot tables. However, not sure how to use one for large datasets that span an entire calendar year. The dataset I am working with has over 60,000 orders.
Feb 10 2024 04:54 PM
Feb 18 2024 06:31 AM - edited Feb 18 2024 06:32 AM
For this scenario, you would want to use a combination of functions to calculate the days between sales orders for each item. Firstly, you can utilize the DATEDIF function to calculate the difference in days between consecutive sales orders for each item. Then, you would need to employ functions like IF, INDEX, and MATCH to handle varying numbers of sales orders per item. By using these functions together, you can dynamically calculate the days between sales orders for each item regardless of the total number of sales orders they have.