27.11 Logistics: On-Time Delivery by Route
Example first. Ravindra Bagale 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.
Logistics project — 30 सेकंदात
काय: Logistics चा tracker: tblShipments नावाची एक Table, OnTime हा calculated column, KPI cells, City प्रमाणे PivotTable, एक chart आणि एका पानाचा dashboard.
का: खऱ्या Logistics report चा हाच आकार असतो: Shipments, On-time %, Total Km हे आकडे manager सगळ्यात आधी वाचतो.
छोटं उदाहरण: 6 rows मधून Shipments = 6, On-time % = 66.7%, Total Km = 2,365.
Logistics project — 30 सेकंड में
क्या: Logistics का tracker: tblShipments नाम की एक Table, OnTime calculated column, KPI cells, City के हिसाब से PivotTable, एक chart और एक पन्ने का dashboard.
क्यों: असली Logistics report का यही आकार होता है: Shipments, On-time %, Total Km वे आँकड़े हैं जो manager सबसे पहले पढ़ता है.
छोटा उदाहरण: 6 rows से Shipments = 6, On-time % = 66.7%, Total Km = 2,365.
First look at the data (before → after):
Expected result — Calculated column
| ShipID | OnTime |
|---|---|
| SH-201 | Yes |
| SH-202 | No |
| SH-203 | Yes |
| SH-204 | Yes |
| SH-205 | No |
| SH-206 | Yes |
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 |
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 |
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:
- Type the data and press Ctrl+T; name the Table
tblShipmentsin Table Design › Properties › Table Name. - Add the column OnTime with
=IF([@ActualDays]<=[@PromisedDays],"Yes","No"); the Table fills it down. - On a KPI sheet type
=ROWS(tblShipments[ShipID])and the other KPI formulas from the table below. - Click Insert › PivotTable › From Table/Range, put City in Rows and Km in Values (Sum).
- Click PivotTable Analyze › PivotChart › Clustered Bar, then PivotTable Analyze › Insert Slicer › OnTime.
- Move the KPI cells, the chart and the slicer onto a sheet named Dashboard.
स्टेप बाय स्टेप करून बघा:
- Data type करा आणि Ctrl+T दाबा; Table Design › Properties › Table Name मध्ये Table ला
tblShipmentsनाव द्या. - OnTime column
=IF([@ActualDays]<=[@PromisedDays],"Yes","No")ने जोडा; Table तो खाली भरते. - KPI sheet वर
=ROWS(tblShipments[ShipID])आणि खालच्या table मधले बाकीचे KPI formulas type करा. - Insert › PivotTable › From Table/Range वर click करा, Rows मध्ये City आणि Values मध्ये Km (Sum) ठेवा.
- PivotTable Analyze › PivotChart › Clustered Bar वर click करा, मग PivotTable Analyze › Insert Slicer › OnTime.
- KPI cells, chart आणि slicer Dashboard नावाच्या sheet वर हलवा.
स्टेप बाय स्टेप करके देखें:
- Data type करें और Ctrl+T दबाएँ; Table Design › Properties › Table Name में Table को
tblShipmentsनाम दें. - OnTime column
=IF([@ActualDays]<=[@PromisedDays],"Yes","No")से जोड़ें; Table उसे नीचे भर देती है. - KPI sheet पर
=ROWS(tblShipments[ShipID])और नीचे की table के बाकी KPI formulas type करें. - Insert › PivotTable › From Table/Range पर click करें, Rows में City और Values में Km (Sum) रखें.
- PivotTable Analyze › PivotChart › Clustered Bar पर click करें, फिर PivotTable Analyze › Insert Slicer › OnTime.
- KPI cells, chart और slicer को Dashboard नाम की sheet पर ले जाएँ.
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") |
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 |
PivotTable (expected):
| City | Sum of Km |
|---|---|
| Kolhapur | 230 |
| Nagpur | 1,440 |
| Nashik | 210 |
| Sambhaji Nagar | 235 |
| Solapur | 250 |
| Grand Total | 2,365 |
Chart and dashboard (one under the other):
- Click inside the PivotTable, then PivotTable Analyze › PivotChart › Clustered Bar › OK.
- Add a chart title and data labels with Chart Design › Add Chart Element.
- Click PivotTable Analyze › Insert Slicer, tick OnTime and click OK.
- 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. - Cut and paste the chart and slicer onto the Dashboard sheet.
- 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):
- Which city has the highest sum of Km?
- Filter the Table on City = Nagpur (Data › Filter): what is Shipments for Nagpur alone?
- 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.
Ravindra Bagale's Tip – मराठी
OnTime हा calculated column Table च्या आतच ठेवा. मग नवीन rows ना formula आपोआप मिळतो, आणि PivotTable ला फक्त Refresh लागतं.
Ravindra Bagale's Tip – हिंदी
OnTime calculated column को Table के अंदर ही रखें. फिर नई rows को formula अपने आप मिलता है, और PivotTable को सिर्फ़ Refresh चाहिए.
Loading practice tasks...
- Total parcels (Easy): Add up Parcels in D2:D11.
- Average cost (Easy): Average of E2:E11, rounded to 2 decimals.
- Rows in Royal Mail (Easy): How many rows have Carrier "Royal Mail"?
- Largest parcels (Easy): The largest value in D2:D11.
- Parcels for Royal Mail (Medium): Total of D2:D11 where B is "Royal Mail".
- Royal Mail in London (Medium): Total of D2:D11 where B is "Royal Mail" and C is "London".
- Best in Royal Mail (Medium): Largest E2:E11 value where B is "Royal Mail".
- Value of row 2 (Medium): D2 times E2.
- Look up Neha Gupta (Medium): The Parcels for "Neha Gupta" (use a lookup on column A).
- Total value (Hard): Sum of D times E for all rows.
- Share of Royal Mail (Hard): Share of D2:D11 that is "Royal Mail", rounded to 3 decimals.
- Rank of row 2 (Hard): Rank of D2 among D2:D11 (largest = 1).
- Above average? (Hard): "Above" if E2 is above the average of E2:E11, else "Below".