There's more...

A closely related measure to OCT is OLT. OLT is a measure of how long it takes to fulfill an order, once it's been received. To calculate OLT, follow these steps:

  1. Create the following measure:
OLT (Days) = 
VAR __Table =
ADDCOLUMNS(
GROUPBY(
'R06_Table',
'R06_Table'[Order],
"__Delivered",MAXX(CURRENTGROUP(),'R06_Table'[DeliveredDate]),
"__Ordered",MINX(CURRENTGROUP(),'R06_Table'[ReceiveDate])
),
"__Days",
DATEDIFF([__Ordered],[__Delivered],DAY)
)
RETURN
AVERAGEX(__Table,[__Days])
  1. Add the OLT measure to the Values area of the table charts we created previously.

To calculate the OLT (Days) measure, we start by using GROUPBY to summarize our base data table, R06_Table, by Order. For each Order, we calculate the ordered date, __Ordered, and the delivered date, __Delivered. Then, we use ADDCOLUMNS to calculate the number of days, __Days, between __Ordered and __Delivered. The calculation for __Days uses DATEDIFF with the DAY parameter. Finally, we can simply return the average value for the __Days column within __Table using the AVERAGEX function.