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

15. Final Project: FreshGo Maharashtra Monthly Report

15.3 Stage 2 – Tables and Lookup Formulas

Steps in Excel

  1. Convert Stores, Products and Targets to Tables: tblStores, tblProducts, tblTargets (Ctrl + T, Table Design › Table Name).
  2. Add calculated columns to tblOrders:
    • Platform: =XLOOKUP([@[Store ID]],tblStores[Store ID],tblStores[Platform],"Not found") (Microsoft 365 / Excel 2021+)
    • Category: =XLOOKUP([@Product],tblProducts[Product],tblProducts[Category],"Not found")
    • Delivery Fee: =XLOOKUP([@Amount],{0;99;199;499},{30;25;15;0},,-1) (match mode −1 = exact or next smaller)
    • On Time: =IF([@[Delivery Mins]]="","",IF([@[Delivery Mins]]<=12,"Yes","No"))
  3. Older Excel: replace XLOOKUP with =IFERROR(INDEX(tblStores[Platform],MATCH([@[Store ID]],tblStores[Store ID],0)),"Not found").
  4. Check: =COUNTIF(tblOrders[Platform],"Not found") must be 0.

Worked example – fee check. An order of ₹150 → fee ₹25; ₹199 → ₹15; ₹520 → ₹0; ₹64 → ₹30 (same slabs as Module 4).

Ravindra Bagale's Tip

Many students apply a lookup formula and never check how many "#N/A" there are – then a "(blank)" or "#N/A" category shows up in the pivot. Always give "Not found" in if_not_found and check with COUNTIF that the count is 0. If it isn't 0, find what is missing in the master Table – don't change the formula.

Practice task

Add the Platform, Category, Delivery Fee and On Time columns to tblOrders, confirm there are zero "Not found" values, and write the INDEX-MATCH version of the Platform formula in a note.

Loading practice tasks...

  1. Total orders (Easy): Add up Orders in D2:D11. (sheet "Data")
  2. Total GMV (Easy): Add up GMV (£) in E2:E11. (sheet "Data")
  3. Grocery rows (Easy): How many rows have Category "Grocery"? (sheet "Data")
  4. Max GMV (Easy): Largest GMV (£) in E2:E11. (sheet "Data")
  5. Pune rows (Easy): How many rows have City "Pune"? (sheet "Data")
  6. Pune GMV (Medium): Total of GMV (£) where City is "Pune". (sheet "Data")
  7. Grocery orders (Medium): Total of Orders where Category is "Grocery". (sheet "Data")
  8. Orders over 500 (Medium): How many SKUs have Orders > 500? (sheet "Data")
  9. GMV of BK-08 (Medium): GMV (£) for SKU "BK-08". (sheet "Data")
  10. Share Pune GMV (Hard): Pune GMV / all GMV, 3 decimals. (sheet "Data")
  11. Avg AOV (Hard): Average of AOV (£) in F2:F11, rounded to 1 decimal. (sheet "Data")
  12. Above avg GMV? (Hard): "High" if E2 > average GMV else "OK". (sheet "Data")

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Stage 2 Tables And Lookup Formulas?
Card 1: What is Stage 2 Tables And Lookup Formulas? · Download PNG
Revision card 2: Tiny example — Stage 2 Tables And Lookup Formulas
Card 2: Tiny example — Stage 2 Tables And Lookup Formulas · Download PNG
Revision card 3: Checklist — Stage 2 Tables And Lookup Formulas
Card 3: Checklist — Stage 2 Tables And Lookup Formulas · Download PNG