Exercise 3: Excel Tables, Structured References & Micro-Dashboards
Grounded directly in Module_4_Demo.xlsx and the "4-Tables and Structures of data" course mindmap, transform raw operational sheets into official Excel Tables (ListObjects). Write production-grade calculated columns, deploy dynamic Total Rows powered by =SUBTOTAL(109, ...), execute cross-table relational lookups, and assemble an interactive operational micro-dashboard following the "It's Just a Dashboard!" philosophy.
π Source Lab Workbook
- Primary File:
11_Demos_and_Workbooks/04_Tables/Module_4_Demo.xlsx - Worksheet Tabs:
Table_VS_Range,Sales_Data,Employee_Records,Dept_Heads,Product_Inventory.
π― 5 Levels of Mastery
Level 1: Recall & Conversion (Range vs. Table)
- The Range vs Table Drill:
- Open sheet
Table_VS_Range. - Compare unstructured range
C6:E12againstTable2(G6:J13). - Examine calculated column
Malakusing=Table2[[#This Row],[Smmar ]]*Table2[[#This Row],[Nariman ]]. - Inspect the live Total Row in row 13 with
=SUBTOTAL(101, ...)and=SUBTOTAL(109, ...).
- Open sheet
- Sales Data Conversion:
- Open sheet
Sales_Data. - The sheet contains 101 clean records (
A1:L101) converted toSalesTableacross 12 structured fields includingOrderYear,TotalPrice, andEmailDomain.
- Open sheet
Click to Expand Level 1 Hint & Solution
- Shortcut: Pressing
Ctrl + Topens the Create Table dialog immediately. - Rename Location: Contextual ribbon tab
Table Design(far leftTable Namebox).
Level 2: Direct Formula Application (Calculated Columns)
- Open sheet
Product_Inventory. ConvertA1:F52into an Excel Table namedInventoryTable. - Create the following four calculated columns using pure structured references:
InventoryValue: Total capital tied up in stock:EXCEL=[@CurrentStock] * [@CostPerUnit]GrossMarginEGP: Unit profit in Egyptian Pounds:EXCEL=[@SellingPrice] - [@CostPerUnit]MarkupPct: Markup percentage over cost:EXCEL=([@SellingPrice] - [@CostPerUnit]) / [@CostPerUnit]ReorderAlert: Operational stock flag:EXCEL=IF([@CurrentStock] <= [@ReorderLevel], "REORDER", "OK")
- Verification: Notice how entering the formula on row 2 instantly evaluates all 51 products without manual dragging!
Click to Expand Level 2 Hint & Solution
- Format
MarkupPctas a percentage (Ctrl + Shift + %). - Notice items like
EGY004 Phone Charger(Stock: 30, Reorder: 35) evaluate to"REORDER".
Level 3: Multi-Step Analytical Problem (Total Row & Filtered Subtotals)
- In
InventoryTable, enable the Total Row (Ctrl + Shift + T). - Configure summary calculations for the following columns:
CurrentStock: Set to Sum (=SUBTOTAL(109, InventoryTable[CurrentStock])).CostPerUnit: Set to Average (=SUBTOTAL(101, InventoryTable[CostPerUnit])).InventoryValue: Set to Sum (=SUBTOTAL(109, InventoryTable[InventoryValue])).
- Click inside
InventoryTable$\rightarrow$ Table Design > Insert Slicer $\rightarrow$ selectReorderAlert. - Click
"REORDER"on the Slicer. - Analytical Audit:
- Verify how the Total Row dynamically recalculates only the visible filtered rows.
- Record the total units required and total capital currently tied up in reorder-flagged SKUs.
Click to Expand Level 3 Hint & Solution
- Standard
=SUM()would include all rows.=SUBTOTAL(109, ...)correctly excludes items marked"OK".
Level 4: Business Edge Cases & Cross-Table Lookups
- Open sheet
Employee_Records. ConvertA1:I31to an Excel Table namedEmployeeTable. - Add a calculated column
FullName:EXCEL=[@FirstName] & " " & [@LastName] - Add a calculated column
DeptManager:- Sheet
Dept_Headscontains a horizontal lookup matrix mapping departments to executive leaders. - Write an
XLOOKUP(orHLOOKUP) that looks up[@Department]in row 1 ofDept_Headsand returns the executive manager from row 2:EXCEL=XLOOKUP([@Department], Dept_Heads!$A$1:$F$1, Dept_Heads!$A$2:$F$2, "Unassigned")
- Sheet
- Add a calculated column
TenureYears:EXCEL=INT(YEARFRAC([@HireDate], TODAY()))
Click to Expand Level 4 Hint & Solution
- Classic HLOOKUP alternative:
=HLOOKUP([@Department], Dept_Heads!$A$1:$F$2, 2, FALSE).
Level 5: Capstone Connection β "It's Just a Dashboard!"
Transform SalesTable into an interactive operational micro-dashboard:
- Ensure
TotalPriceis calculated:=[@Quantity] * [@UnitPrice]. - Enable Total Row (
Ctrl + Shift + T) and setTotalPriceto Sum. - Insert two interactive Slicers:
Category(Electronics,Peripherals)Governorate(Cairo,Alexandria,Asyut,Giza,Luxor,Sohag,Gharbia)
- Format the Slicers with 3-4 columns and position them above the table headers.
- Filter to
Governorate = AsyutandCategory = Electronics. - Verification & Audit:
- Read the total revenue displayed in the Total Row.
- Confirm that the operational table behaves as a complete, responsive, point-and-click dashboard!
- Navigate to
Sheet1: Refresh the Pivot Table (Alt + F5) to observe howProduct_Inventoryaggregations synchronize.
π Comprehensive Solutions
- Detailed step-by-step walkthroughs, formula code, and explanations are documented in Ex03 Solutions.