Project Hub

Project · Supplier scorecard

Tracing 29% of late deliveries to a supplier's late hand-over

The problem

Buyers can't see which suppliers and departments deliver late or short until shelves run empty.

The solution

A Power BI supplier scorecard on a star schema: on-time-in-full, fill rate and late rate by supplier and department, a watch list of suppliers to call, and each buyer seeing only their department.

How it works

  • Load: Orders, suppliers and departments into a star schema, checked on every load
  • Rules: On-time-in-full, fill rate and late rate written once in DAX
  • Secure: Row-level security: each buyer sees only their department
  • Report: Power BI scorecard, reloaded from source on demand

A closer look

Mental model: one real order line, ordered on 14 May, handed to the carrier six days after the supplier's 18 May deadline and delivered two days late; after a late hand-over 20.5% of lines arrive late, against 5.2% after an on-time one.
One order line, two promises.
Star schema: one fact table of 112,650 order lines joined to 3,095 suppliers, 32,951 products and 774 dates, with side tables for 10 buyers, 11 weekly summaries and one row of client settings.
One fact table, three dimensions.
Chart: late rate against delivered lines for every supplier, on a log scale; the 61 watch-list suppliers have 4.4% of deliveries, 12% of late ones and a late rate of 13.2% together.
The 61 suppliers to watch.
Chart: late deliveries by promised month, March 2017 to August 2018, between 1.5% and 6.8% in most months, with peaks of 12.2% in December 2017 and 16.3% in March 2018.
Late rate by promised month.

The code

WORST_SUPPLIER_SQL = """
SELECT s.supplier, COUNT(*) AS late_lines
FROM star.fact_order_line f
JOIN star.dim_product p  USING (product_key)
JOIN star.dim_supplier s USING (supplier_key)
CROSS JOIN star.client_setting c
WHERE DATE_TRUNC('week', f.due_date)::date = %(week)s
  AND f.delivered_date > f.due_date + c.on_time_grace_days
summarize.py

The impact

  • On-time-in-full, fill rate and late rate per supplier and department, from one set of DAX measures.
  • Late deliveries traced back to the supplier's late hand-over.
  • Each buyer sees only their own department.

The result

98,666 orders: 29% of late deliveries started with a supplier's late hand-over, and 61 suppliers with 4.4% of deliveries accounted for 12% of them.

Built with

  • Power BI
  • DAX
  • Power Query
  • PostgreSQL
  • Python