Olist Delivery Dashboard: A Power BI Model That Admits What the Prediction Can't Do
2026-10-15
Olist Delivery Dashboard: A Power BI Model That Admits What the Prediction Can’t Do
Most dashboards built on top of a machine-learning model show the model’s best angle. This one, built for a MBA assignment of mine, does the opposite: one of its four pages exists to show how weak the late-delivery prediction is, so that nobody acts on it with more confidence than it deserves. The data is the public Olist dataset — about 96,000 delivered orders from a Brazilian marketplace, January 2017 to August 2018.
Where the numbers come from
The Power BI file doesn’t read the nine raw Olist CSVs directly. A Python notebook does the heavy work first: it joins orders, items, payments, reviews, customers, sellers and products; calculates seller-to-customer distance; fits a regression on review scores and a random forest on lateness; then writes a handful of tidy extract files for Power BI. Keeping that split meant the report stays fast and every modelling decision lives in one reviewable place.
One cleaning decision changed the headline. Comparing timestamps flagged 7,822 orders as late; comparing calendar dates gives 6,531. The other 1,291 arrived on the promised day, just later in the afternoon. The late rate the report uses is 6.8%.
How the model is laid out
One fact table, a few dimensions, and several small tables that each feed a single visual.
| Table | Role | What it holds |
|---|---|---|
fact_orders_scored | Fact | One row per delivered order: dates, state, category, price, freight, distance, days late, review score, model score, risk band, predicted vs actual outcome |
dim_date, Year-Month | Dimension | Calendar for slicers and monthly trends |
dim_state | Dimension | The 27 Brazilian states, code and full name |
dim_seller_scorecard | Dimension | One row per seller: orders, revenue, late rate, average review, watch-list flag |
olist_order_items_dataset | Detail | Raw order lines, the only source table loaded as-is |
model_scorecard | Single row | Test-set metrics, threshold, and the regression’s late-delivery penalty |
calibration_lift_deciles | Supporting | Model score vs actual late rate by decile |
threshold_tradeoff | Supporting | Precision, recall and share of orders flagged at each cut-off |
rf_importance_full | Supporting | Which inputs the random forest relies on |
ols_coefficients | Supporting | Regression terms behind review scores |
option_b_padding_simulation | Scenario | Late rate if delivery promises were extended by 0 to 10 days |
TargetRate | Parameter | User-set late-rate target |
_Measures | Measures | Home for every DAX measure |
All measures sit in _Measures, so nobody has to hunt through tables for them. They fall into four groups: volume and value (Orders, Revenue), service (Late Rate, Late Orders, Avg Days Late, Late Rate Target), customer (Avg Review, Low Review Rate, Review Gap) and model and action (Precision, Recall, ROC AUC, PR AUC, Watchlist Sellers, Watchlist Late Share, Watchlist Revenue Share).
Four pages, four questions
Overview — what is happening? Orders, revenue, average review and the review gap between on-time and late orders, with a late-rate KPI against target. A combo chart tracks volume against late rate by month; a treemap and bar chart show which states and categories run late.
Model Trust — can we believe the prediction? Precision, recall, ROC AUC and PR AUC cards, a confusion matrix, late rate by risk band, a calibration chart and the threshold trade-off. This is the page I’d defend hardest.
Drivers — why? Distance against late rate by state, the features the model leans on, the regression terms that pull review scores down, and a decomposition tree that splits late orders by state, category, payment type and seller.
Action — what do we do? A what-if on promise padding, a gauge of late rate against a target the user sets, and a seller watch-list.
Date, state and category slicers repeat across the first three pages, so a question asked on one page carries to the next.
The page that says “don’t trust this too much”
The random forest was trained on orders before April 2018, tuned on April and May, and tested on July and August — orders it had never seen. On that test it scores a ROC AUC of 0.59, where 0.50 is a coin toss. At the chosen threshold it flags 3,343 orders to catch 195 genuinely late ones: roughly 6 in 100 alerts are right, and two-thirds of late orders are missed.
The calibration chart carries the title “Scores run far above the real late rate” because that is the finding. The model’s scores rank orders slightly better than chance, but they are not probabilities and shouldn’t be read as such. Showing this beside the confusion matrix stops the risk bands from looking more authoritative than they are.
From insight to action
Since the model is too weak to drive order-level alerts, the Action page leans on two things that don’t depend on it.
- Promise padding. Adding days to the promised delivery date cuts the late rate from 6.8% to about 2.2% at ten days — but stretches the average promise from 24 to 34 days. The chart puts both on one axis so the trade-off is visible, not buried.
- Seller watch-list. 55 of 2,936 sellers have at least 30 orders and a late rate more than double the average. Three cards show how many they are, their share of late orders and their share of revenue — the case for dealing with a few sellers instead of every order.
Why it matters: in the regression, a late delivery costs about 1.7 points on a five-point review, holding price, freight, distance and month constant.
What I’d still change
The scenario and model tables are static extracts; changing the threshold means re-running the notebook, not moving a slider. I’d either score in a scheduled pipeline or bring the threshold in as a proper what-if parameter. The padding simulation also assumes customers don’t care about a longer promise, which they would — the next version needs a conversion cost next to the late rate. And the review regression explains about 18% of the variation in scores, so the 1.7-point penalty is an association, not a guarantee.
Gallery





