← Aditya Bothe

Analytics  /  Case study

Freight Analytics on
Microsoft Fabric

Opex Logistics, carrier and shipment performance

A Power BI report for a freight network of 200 customers, 30 carriers and 50 routes, built on Microsoft Fabric from raw ERP extracts. Opex Logistics is a training case study with a synthetic dataset. The work was getting from eight messy CSV files to numbers I could defend, and most of this page is about what was wrong with the data and how I found it.

What I built

CSV extracts→Lakehouse→Dataflow Gen2 (cleansing)→Direct Lake semantic model→Power BI report

The numbers, after cleaning

5,562Shipments, 2023 to 2026
$205.4MFreight revenue
25.9%On time, against a 92% target
13.2%Of shipments lost
$58.9MRevenue on lost or delayed loads

Every one of these matches the validation totals in the project brief. Before the cleanup they did not: the model was counting 5,611 shipments and $207.7M.

The service picture is the headline. About one delivered load in four arrives on time, and one shipment in eight is lost. Every carrier is late on most of its deliveries, from 64.1% of loads at the best carrier to 85.0% at the worst, so this is a network problem rather than one bad contract. Revenue is spread thin: the top ten customers bring in 8.4% of it, so no single account carries the business.

The report

All four pages as exported from the Power BI service, with every slicer set to All. Click any page to open it full size.

Overview page: KPI cards for revenue, valid shipments, loss rate, revenue at risk and on time delivery, a monthly revenue line against the prior year, shipments by status, and revenue by region and freight type
Overview. The five headline measures, revenue by month against the prior year, and where shipments end up by status.
Delivery and Delay page: late delivery rate for each of 30 carriers, on time delivery by month, shipments by acquiring company and by delay reason, and a route table
Delivery and delay. Late rate by carrier, ranked from worst to best, on time delivery by month, and delay causes, with the 100 delayed loads that had no reason shown as “Not recorded” instead of dropped.
Customer and Revenue page: revenue by customer with IDs on shared names, revenue by sector, a customer detail table, and a shipment map by destination city
Customer and revenue. Shared customer names carry their ID, so each bar is one account.
Locations page: map of total shipments by destination state
Locations. Shipments by destination state, now that each route’s state follows its city.

What was wrong with the data

I profiled every file in Python before trusting the model, then checked the model itself with DAX queries. These are the problems that changed a number on the report.

ProblemWhat it did to the reportFix
50 shipments with a blank IDShipment count and revenue overstated against the briefRemoved duplicates on shipment ID in the dataflow, as the brief specifies
Route states that did not match the city: 46 of 50 destinations wrong, Charlotte listed in six different statesThe shipment map plotted volume in the wrong statesDerived each state from its city in the dataflow
Customer states wrong for 182 of 200 customersAny customer geography was unusableSame city to state rule
200 customer IDs sharing only 99 namesRevenue by customer merged up to six separate accounts into one barAdded the customer ID to any name used more than once
The fuel surcharge key held the shipment date, not the monthOnly 224 of 5,611 shipments found a fuel rateSet the key to the first of the month; every shipment now matches except August to October 2026, where no rates exist
On time % and late % divided by different basesThe two did not add up to 100%Both now use delivered shipments that have a delivery date
Year over year growth worked out across all years at onceA misleading +5.5% on the overview cardThe card now only shows growth when a single year is selected
Late deliveries by carrier shown as a countBusy carriers looked worst simply for being busyChanged to a late rate; one carrier with almost the fewest late loads ranks among the six worst by rate
Placeholder weights of −1 and delayed loads with no reasonWeight totals off, delay causes undercountedWeights set to blank, missing reasons labelled “Not recorded”

Scroll the table sideways on a phone

What the data cannot tell you

Some problems are not fixable by cleaning, and the honest thing is to say so on the report rather than chart around them.

Notes on method

I checked the raw files and the published model separately. The files told me what the data should look like; the model told me what the report was actually doing with it. Two of the larger problems, the fuel key and the merged customer names, only showed up on the model side, because each file looked fine on its own.

Fixes live in the dataflow wherever possible, so they run on every refresh instead of being patched in a visual.