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


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_daysThe 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.