Ravindra BagaleCourses & study guides मराठी Track your progress

27. 20 Industry Projects

Excel

27.11 Logistics: On-Time Delivery by Route

Example first. Abhishek Shinde dispatches fictional trucks from a Pune hub to five cities and wants on-time delivery tracked per shipment.

Logistics project — in 30 seconds

What: A Logistics tracker: one Table tblShipments, the calculated column OnTime, KPI cells, a PivotTable by City, a chart and a one-page dashboard.

Why: This is the shape of a real Logistics report: Shipments, On-time %, Total Km are the numbers a manager reads first.

Tiny example: From 6 rows: Shipments = 6, On-time % = 66.7%, Total Km = 2,365.

First look at the data (before → after):

Logistics project: before and after tables, fictional FreshGo Maharashtra data

Expected result — Calculated column

ShipID OnTime
SH-201 Yes
SH-202 No
SH-203 Yes
SH-204 Yes
SH-205 No
SH-206 Yes

About this data: Teaching sample for a fictional shop “BrightLedger Finance”. Figures and names (e.g. Neha Shah) are made up for this lesson on logistics on time delivery by route.

Expected result — KPI cells (expected results)

KPI Formula Result
Shipments =ROWS(tblShipments[ShipID]) 6
On-time % =COUNTIF(tblShipments[OnTime],"Yes")/ROWS(tblShipments[OnTime]) 66.7%
Total Km =SUM(tblShipments[Km]) 2,365

About this data: Demo table only — not real customer or company data. Built to practise logistics on time delivery by route.

Before table and formula as text

Before — Table tblShipments (fictional sample rows)

ShipID City Km PromisedDays ActualDays
SH-201 Nagpur 720 2 2
SH-202 Solapur 250 1 2
SH-203 Nashik 210 1 1
SH-204 Kolhapur 230 1 1
SH-205 Nagpur 720 2 3
SH-206 Sambhaji Nagar 235 1 1

About this data: Made-up rows so you can copy the pattern for logistics on time delivery by route. Currencies may use ₹, £, € or $.

Formula / click path

OnTime: =IF([@ActualDays]<=[@PromisedDays],"Yes","No")
Shipments: =ROWS(tblShipments[ShipID])
On-time %: =COUNTIF(tblShipments[OnTime],"Yes")/ROWS(tblShipments[OnTime])
Total Km: =SUM(tblShipments[Km])

Do it step by step:

  1. Type the data and press Ctrl+T; name the Table tblShipments in Table Design › Properties › Table Name.
  2. Add the column OnTime with =IF([@ActualDays]<=[@PromisedDays],"Yes","No"); the Table fills it down.
  3. On a KPI sheet type =ROWS(tblShipments[ShipID]) and the other KPI formulas from the table below.
  4. Click Insert › PivotTable › From Table/Range, put City in Rows and Km in Values (Sum).
  5. Click PivotTable Analyze › PivotChart › Clustered Bar, then PivotTable Analyze › Insert Slicer › OnTime.
  6. Move the KPI cells, the chart and the slicer onto a sheet named Dashboard.

The brief. Build a shipment sheet: an on-time flag (actual days ≤ promised days), number of shipments, on-time %, total kilometres, kilometres by destination city, a chart and an OnTime slicer.

Calculated column formulas:

Column Formula
OnTime =IF([@ActualDays]<=[@PromisedDays],"Yes","No")

About this data: Fictional worksheet used in class. Safe to edit; nothing here is live production data.

KPI cells (check your numbers):

KPI Formula Result
Shipments =ROWS(tblShipments[ShipID]) 6
On-time % =COUNTIF(tblShipments[OnTime],"Yes")/ROWS(tblShipments[OnTime]) 66.7%
Total Km =SUM(tblShipments[Km]) 2,365

About this data: Teaching sample for a fictional shop “BrightLedger Finance”. Figures and names (e.g. Neha Shah) are made up for this lesson on logistics on time delivery by route.

PivotTable (expected):

City Sum of Km
Kolhapur 230
Nagpur 1,440
Nashik 210
Sambhaji Nagar 235
Solapur 250
Grand Total 2,365

About this data: Demo table only — not real customer or company data. Built to practise logistics on time delivery by route.

Chart and dashboard (one under the other):

  1. Click inside the PivotTable, then PivotTable Analyze › PivotChart › Clustered Bar › OK.
  2. Add a chart title and data labels with Chart Design › Add Chart Element.
  3. Click PivotTable Analyze › Insert Slicer, tick OnTime and click OK.
  4. Insert a new sheet named Dashboard. In it, link a card cell to each KPI (for example =KPI!B2) and format it large and bold.
  5. Cut and paste the chart and slicer onto the Dashboard sheet.
  6. On the View tab, untick Gridlines in the Show group. Select the dashboard area and click Page Layout › Print Area › Set Print Area.

Template and guide: download the practice template Logistics_Template.xlsx and read the step-by-step template guide. The template's sample rows may differ from the rows above; the method is the same.

Related ready-made dashboard: the Logistics dashboard guide and its workbook Logistics_Dashboard.xlsx show a finished version of this kind of report.

Practice task (try it before you open the answer):

  1. Which city has the highest sum of Km?
  2. Filter the Table on City = Nagpur (Data › Filter): what is Shipments for Nagpur alone?
  3. Add the Clustered Bar PivotChart and the OnTime slicer to your Dashboard sheet.
Answer

Nagpur (1,440). For Nagpur only (2 rows): Shipments = 2. The chart shows 5 bars, one per city.

Ravindra Bagale's Tip

Keep the calculated column OnTime inside the Table. New rows then get the formula automatically, and the PivotTable only needs Refresh.

Loading practice tasks...

  1. Total parcels (Easy): Add up the "Parcels" column.
  2. Average cost (Easy): Average of Cost (£) in the "Cost (£)" column, rounded to 2 decimals.
  3. Royal Mail rows (Easy): How many rows have Carrier "Royal Mail"?
  4. Largest parcels (Easy): Largest the "Parcels" column.
  5. London rows (Easy): How many rows have City "London"?
  6. Royal Mail parcels (Medium): Total of Parcels where Carrier is "Royal Mail".
  7. London cost (Medium): Total of Cost (£) where City is "London".
  8. Parcels over 300 (Medium): How many rows have Parcels > 300?
  9. Parcels of Sophie Martin (Medium): Parcels for Name "Sophie Martin".
  10. Royal Mail parcel share (Hard): Royal Mail parcels / all parcels, 3 decimals.
  11. Royal Mail in London (Hard): Total Parcels where Carrier is "Royal Mail" and City is "London".
  12. Above avg parcels? (Hard): "High" if the "Parcels" value in the first row > average parcels else "OK".