OTIF: on-time in-full delivery KPI with DAX

How to calculate on-time in-full (OTIF), order lines delivered on the promised date with the full quantity divided by all lines due, on time and in full measured separately, by order or by line, tolerance windows, the DAX on a deliveries table, and a chart of failures by reason.

Short answer: OTIF (on-time in-full) = order lines delivered on the promised date with the full quantity / all order lines due in the period. Report on time and in full separately too: an OTIF of 88% can come from 95% on time and 92% in full, two different problems for logistics and for planning. Define the details once: promised date (first confirmed, not the latest), the tolerance (same day, or within one day), and whether it is measured per line or per order (an order is OTIF only if all its lines are).

Customers judge suppliers by OTIF, and large retailers fine suppliers who miss it. It is the clearest single measure of whether operations keep promises.

How is it calculated?

ResultLinesShare
On time and in full1,76088.0%
On time, short quantity1407.0%
Late, full quantity804.0%
Late and short201.0%
Total2,000100%
Order lines due in September
  • On time = (1,760 + 140) / 2,000 = 95.0%
  • In full = (1,760 + 80) / 2,000 = 92.0%
  • OTIF = 1,760 / 2,000 = 88.0%
02040608010095Stock not available60Carrier delay45Picking error40Late production
OTIF failures by reason (lines)

What is the DAX?

A Deliveries table with one row per order line: Order ID, Line, Promised Date, Delivered Date, Ordered Qty, Delivered Qty, Failure Reason. Relate Promised Date to the Date table, so lines count in the period they were due:

Lines Due = COUNTROWS ( Deliveries )

On Time Lines =
CALCULATE (
    [Lines Due],
    FILTER ( Deliveries, Deliveries[Delivered Date] <= Deliveries[Promised Date] )
)

In Full Lines =
CALCULATE (
    [Lines Due],
    FILTER ( Deliveries, Deliveries[Delivered Qty] >= Deliveries[Ordered Qty] )
)

OTIF Lines =
CALCULATE (
    [Lines Due],
    FILTER (
        Deliveries,
        Deliveries[Delivered Date] <= Deliveries[Promised Date]
            && Deliveries[Delivered Qty] >= Deliveries[Ordered Qty]
    )
)

On Time % = DIVIDE ( [On Time Lines], [Lines Due] )
In Full % = DIVIDE ( [In Full Lines], [Lines Due] )
OTIF % = DIVIDE ( [OTIF Lines], [Lines Due] )

-- order level: an order counts only if all its lines are OTIF
OTIF Orders % =
VAR Orders = VALUES ( Deliveries[Order ID] )
VAR Good = FILTER ( Orders, CALCULATE ( [OTIF Lines] = [Lines Due] ) )
RETURN DIVIDE ( COUNTROWS ( Good ), COUNTROWS ( Orders ) )

Lines not yet delivered past their promised date have a blank Delivered Date; count them as late with Deliveries[Delivered Date] <= Deliveries[Promised Date] && NOT ISBLANK ( Deliveries[Delivered Date] ), or the open misses disappear. A calculated column OTIF Flag with 1 or 0 makes the measures simpler and faster on large tables.

What goes wrong?

  • Latest promised date. Re-promising late orders makes them "on time"; use the first confirmed date.
  • Open lines. Undelivered overdue lines must count as failures.
  • Line against order level. Line OTIF is always higher; say which you report, and use the customer's definition when they measure you.
  • Early deliveries. Some customers count early as a failure; add a window (no earlier than one day before) if so.

Where can you check this?

Where do you start?

Record promised and delivered date and quantity for each line, then show OTIF with on time and in full side by side, and the failure reasons. Order cycle time shows how long orders take.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.