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

15. Final Project: FreshGo Maharashtra Monthly Report

Excel

15.3 Stage 2 – Tables and Lookup Formulas

Connect every order to the right place and product

Your approved FreshGo practice workbook has 12 rows, but a manager cannot yet compare platform results because the transactional export has store IDs instead of platform names. Add the platform from the store directory and the category from the product directory. Add a separate fee estimate from the threshold table. For target progress, match a city-level summary to its city target. Each formula should answer an identifiable question, so a reader can check its input key and return column.

Use the original practice directories and the 12-row approved tblOrders from stage one. The app examples are fictional and the fee schedule is a teaching rule. In particular, a fee estimate does not change the recorded Amount used for Net Sales. You will test a known key, an unknown key and a threshold boundary before trusting the filled column.

Choose the comparison from the business rule. Match a store or product key exactly. For a minimum-amount schedule use the highest threshold reached, including an exact boundary.

Pune store PN01 is FreshGo in Kothrud. Pune store PN02 is MarketRush in Baner. Store ID resolves each platform.
Both orders can be from Pune. Store ID is what identifies the correct platform row.

Expected outputs after this stage

  • Every approved order still traces to its SourceRow, original Order ID, approved date and recorded amount.
  • Platform and Category each have one reviewed value on every approved row, ready to place in PivotTable fields.
  • A separate Delivery Fee Estimate column is numeric for all 12 baseline orders and totals ₹175 across approved statuses.
  • A city-level target lookup returns each selected city's target once for that summary row, with all six target values totaling ₹5,000.
  • Nothing in the enrichment process creates a thirteenth approved row or changes the ₹5,179 approved all-status amount.

Name the reference Tables and check their identities

A Table makes formula intent easier to see. Where a cell range like Stores!A2:A13 depends on a precise sheet position, tblStores[Store ID] describes the lookup key by name. Inside the Orders Table, [@[Store ID]] names the value on the current row. The at sign narrows the input to the order you are enriching. Refer to the entire key and return columns on the other side so the formula can find a match in any reference row.

Set up four approved reference Tables

  • On Stores use tblStores with Store ID, Platform, City and Area among its columns. It has 12 rows, two locations per city. Other synthetic classroom directory columns can remain local and are not used here.
  • On Products use tblProducts with Product, Category and Reference Unit Amount. The seven product names are unique in this toy fixture. Key a larger catalog on stable product codes if a display name can change or repeat.
  • On Targets use tblTargets with City and Monthly Target. Its six city keys match the canonical city map used during cleaning. A later range of several target months would need a period-aware key.
  • On Fee_Bands use tblFees with Min Amount and Delivery Fee. Keep its unique numerical minimums in ascending order, and keep each threshold paired with its intended fee.

Create one Table per editable input range using Insert and Table, with headers. Rename it from the Table design controls available in your edition. Use the existing Table when a query or prior step already created one. For example, if tblOrders is a Power Query result, do not wrap it in a new Table. A refresh can update query-owned columns from upstream. If using worksheet formulas as dependent enrichment, retest that they remain aligned and fill correctly after refresh. For a query-only route put deterministic joins in the query and verify the loaded schema.

Pick a key that represents a single directory row

A store lookup by city looks convenient until a city contains two stores. PN01 and PN02 are both Pune. Their platform labels differ and their areas differ. A first-match formula using Pune can display a plausible platform on every row while assigning some purchases to the wrong service. Before worrying about formula syntax, ensure the key can identify the specific lookup row.

On the Stores table you can add a temporary Occurrences check, using =COUNTIF(tblStores[Store ID],[@[Store ID]]) on these known alphanumeric store keys. Every populated Store ID should occur exactly once. Check the blanks separately. For Products and Targets, perform the same check with their own key columns. Document the expected results of 12, seven and six valid keyed rows. An exact lookup with a duplicated key usually returns one matching item under its configured search behavior. The first returned match is not an agreement between conflicting source records.

Suppose a store directory shows PN02 as both MarketRush and FreshGo. That is a conflict inside the directory even though your worksheet can find a match. Ask which directory row and time period are authoritative. Either correct a documented erroneous record or redesign the key if both are valid at different effective dates. Changing the search order to find the desired answer can leave tomorrow's refresh fragile and impossible to explain.

Use a small test key list before filling a whole column

  • PN01 should return FreshGo, Pune, Kothrud. PN02 should return MarketRush, Pune, Baner.
  • SN01 should return FreshGo and Sambhaji Nagar. This confirms territory mapping applied during stage one.
  • ZZ01 is not in the practice directory. The result should visibly request store review.
  • Milk Pack and Dairy Bundle should both map to Dairy. They remain different product keys.
  • Check a conflict you create on a separate scratch directory. The duplicate key flag should identify the repeated record even if the lookup itself returns text.

Use exact lookups for store, category and city target

Add Platform and Category to tblOrders

Platform: =XLOOKUP([@[Store ID]],tblStores[Store ID],tblStores[Platform],"Review store",0)
Category: =XLOOKUP([@Product],tblProducts[Product],tblProducts[Category],"Review product",0)

Enter the formulas following the colon in the two named Table columns. The first argument is the key for this order. The second array holds every reference key, and the third holds the value to return from the matching reference position. The fourth argument is what the learner should see if the key doesn't match. The final zero requests exact matching. Excel normally fills a calculated Table column when you first enter its formula. Check the first, last and one middle record, then inspect for any inconsistent manual replacement or missing formula.

Verify SourceRow 1 and SourceRow 8. The first Store ID is PN01 and its Product is Modak Box. The formula should show FreshGo and Sweets. The second Store ID is PN02 and its Product is Pooja Lamps. It should show MarketRush and Pooja Items. Since both orders are from Pune, this check catches formulas that fall back to a city-level label.

On a controlled copy, give BLK-9007 a nonexistent store key ZZ01 and keep the other fields present. Platform should say Review store. That result is a signal to stop publication until business classification has been reviewed. The order does not become a zero-value purchase because it has an unresolved platform. A count of unresolved enrichments can be part of your readiness check; follow the trace to the originally approved key rather than editing the label directly on the dashboard.

Verify the result describes the order's location

Matching a real key doesn't prove that key belongs to the record. Add an optional Store City check column with a second exact lookup returning tblStores[City]. Compare Store City with the approved order City. Then trace a mismatch to the approved canonical map and directory key. For this miniature, all specified stores also match their published Area. In a real delivery workflow a delivery destination and the store location may justifiably differ. This course models them as agreeing. Confirm what each source field means before using the check outside the exercise.

Try the more subtle mistake in which BLK-9007 has PN01, another real Pune store. The Platform lookup will return a valid FreshGo label. The city check still passes. The area check distinguishes Kothrud from Baner here. This is a useful reminder that exact lookup proves a row in the reference data matched provided input. Reconciliation and independent business checks establish whether the input is correct for that order.

Choose an available exact-match fallback

Use INDEX with MATCH if your Excel version doesn't have XLOOKUP. The zero inside MATCH is important because the earlier function defaults to a different comparison when its third argument is omitted. MATCH returns a position within the comparison range, and INDEX returns the value at that position in the companion return column. Keep the paired ranges the same size and order.

=IFNA(INDEX(tblStores[Platform],MATCH([@[Store ID]],tblStores[Store ID],0)),"Review store")

This alternative uses the same numeric-free code convention as the fixture. MATCH with zero can interpret wildcard characters in a text lookup value; if a future identifier contains a literal question mark or asterisk, handle literal characters explicitly or use an appropriate exact-key method. IFNA makes an expected missing match visible and lets other unexpected formula errors surface. A missing Table title, an incorrect column name or an unsupported function is a different problem from an unknown source key.

Assign a target once per city in a summary

Create a small City_Results worksheet with one row per city. Suppose A2 contains the canonical city Pune. The target formula in a separate column can look up A2 against the city keys. Later you can put a delivered amount summary alongside it and divide using the matching city pair.

=XLOOKUP(A2,tblTargets[City],tblTargets[Monthly Target],"Review target",0)

Pune is ₹1,800, and the course-approved delivered amount ₹1,610 is about 89.44% of that target. Do not sum a target repeated inside the order table. A target is supplied once per city and period, while the raw order count per city varies. Across all six cities the combined target is ₹5,000 and delivered value is ₹4,699, so the selected overall ratio is 93.98%. Since the included data covers five sample days, describe the percentage as progress represented by this extract against the supplied monthly target.

Use thresholds to estimate a delivery fee

Consider a fictional quick-commerce fee card with “₹25 from a purchase of ₹99” followed by “₹15 from ₹199.” A ₹198 order has reached the ₹99 minimum but hasn't reached the next one. A ₹199 order qualifies for the ₹199 band exactly. This relationship uses an ordered numerical comparison, not a text identity. Store IDs carry no meaningful nearest value, but purchase amounts can be compared to tier minimums.

Fee is 30 rupees from 0, 25 from 99, 15 from 199, and zero from 499. Amount 198 reaches 99 and 199 reaches 199.
The exact threshold belongs to the new band. Test immediately below it and at it.

Encode the next-smaller match intentionally

=IF(ISNUMBER([@Amount]),
    XLOOKUP([@Amount],tblFees[Min Amount],tblFees[Delivery Fee],"Review fee",-1),
    "Review amount")

Use the formula in Delivery Fee Estimate. Start with a valid numeric Amount. XLOOKUP's fifth argument −1 requests an exact match first and otherwise the next smaller threshold. This is separate from its optional search-mode argument, which controls the way Excel searches and can use binary modes with sorted arrays. Leave search mode at its default for the core exercise. A numeric amount below the minimum returns the Review fee label because no eligible minimum exists. In the cleaned practice data we expect all amounts to use the nonnegative convention.

The threshold Table still stays sorted ascending. It helps a reviewer read the schedule and lets an older fallback reproduce the inputs. Check every threshold is present once. If a new policy has two rows beginning at ₹199, an approximate match cannot decide which fee the business meant. Clarify whether the choices are contradictory or whether a missing dimension such as city or effective date needs to be included first.

=IF(ISNUMBER([@Amount]),
    IFNA(INDEX(tblFees[Delivery Fee],MATCH([@Amount],tblFees[Min Amount],1)),"Review fee"),
    "Review amount")

In the fallback, MATCH with third argument 1 finds the largest qualifying value when the search range is in ascending order. It returns the position INDEX uses for the fee. A sorted Min Amount column must stay paired with the right Delivery Fee cells. Sorting a single column without the other can leave thresholds and fees incorrectly combined. Test all threshold values after changes to the practice table.

Distinguish a real zero fee from missing evidence

SourceRow 2 has approved amount ₹1,299 and reaches the top threshold, where the fee is zero. That zero is a valid result. A nonnumeric amount or an unknown lookup should have a separate review condition. Replacing all errors with zero makes it impossible to distinguish a qualifying no-fee order from a condition you never checked. In fee reporting, save a count of valid numeric fee results and an independent count of review labels if the input can be incomplete.

The approved-all-status fee total is ₹175. Among the baseline approved orders, four reach the ₹25 band, five reach the ₹15 band, and three reach the ₹0 fee band. None is small enough to have a ₹30 fee. The delivered-only estimate is ₹145 because two approved non-delivered ₹240 orders are excluded, each at a practice fee estimate of ₹15. These are modeled estimates. If actual fees depend on whether an order is cancelled or returned, choose and document an appropriate actual fee field instead of repurposing this simple model.

Trace SourceRow 8 through two exact lookups and one fee tier

  1. Read the approved fields

    BLK-9007 belongs to Pune, Baner with Store ID PN02, Product Pooja Lamps, Qty 2 and recorded Amount ₹1,040. The order is Delivered.

  2. Follow the store ID

    PN02 identifies the MarketRush directory row. City and Area agree with the baseline order. PN01 would return a different Platform and Area despite sharing the city.

  3. Follow the product key

    Pooja Lamps matches the Pooja Items category. The reference unit amount ₹520 happens to produce ₹1,040 at quantity two. The recorded order amount remains the basis of reporting.

  4. Apply the amount threshold

    ₹1,040 meets the highest configured minimum ₹499. The estimate is ₹0 and Net Sales is still ₹1,040 for this Delivered record.

Optional Power Query merge and a row-count safeguard

If tblOrders will be loaded from Power Query, you can add platform and category to that query instead of maintaining worksheet lookup formulas. Merge the approved Orders query on the left with the Store reference query on the right. Select Store ID on both sides, confirm they use compatible text values, and choose a Left Outer join. Select the intended return fields when expanding. A missing match should leave the order available with an unresolved field, not disappear from the transaction audit.

Check one match per order at the point of expansion

Before expanding store attributes, you can check how many matching rows each nested result contains. A Custom Column using Table.RowCount on the joined table value can identify 0, 1 or more matches. A count of one is expected for every baseline order. Zero indicates an unresolved key. More than one indicates a reference collision or a mismatched grain that requires further review. If you simply expand a repeated store match, its order can appear in multiple output rows.

Practice the effect on paper with three order values: ₹450 and ₹120 for PN01, and ₹1,040 for PN02. Their legitimate total is ₹1,610. If an unintended second PN01 directory record is expanded for both of its orders, those two values are duplicated, giving five rows at ₹2,180. A grand total difference of ₹570 is a symptom of order duplication, even though the learner asked only for names. An exact lookup might hide the same duplicate directory by returning one matching label. The correct fix is to verify the reference key, then rerun the order counts and values.

Merge Products using Product as the key for this fixture. Preserve the names of the selected order fields and expand only the directory values needed for reporting. Do not use an inner join to create a cosmetic list of complete-looking rows that silently drops unmatched orders. If you intend to hold unmatched orders while assigning a label, publish a review output and reconcile the held membership and affected values. The optional query route and the worksheet route should converge on the same 12 approved orders and 12 one-to-one relationships for both reference lists.

Keep the optional comparison amount separate

Product data can help you test the relationship by multiplying reference unit amount by approved Qty. In the original miniature every known amount agrees with that multiplication by design. A future order could have a different charged price due to an authorized discount. Suppose the Pooja Lamps reference amount changes in a scratch catalog from ₹520 to ₹550. BLK-9007 has quantity two and shows a new reference comparison of ₹1,100. The recorded purchase stays ₹1,040. A difference of ₹60 is information to explain, not an instruction to recalculate transaction history. If you add a comparison column for the lab, keep it out of Net Sales.

Lab 1 · Verify the exact matching path and one rejected key

Prerequisites. Use the 12 approved September orders and the four local reference Tables. Choose worksheet formulas or compatible exact-match query enrichment. Save a local baseline copy and a separate scratch copy for errors. Before changing either, note the original ₹5,179 all-status amount and ₹4,699 delivered amount.

  1. Name the order and lookup Tables as above. Validate unique required populated keys for stores, products and city targets. Check that every baseline order has exactly one allowed match for store and product.
  2. Fill Platform and Category on the Orders Table. Trace BLK-9001 to FreshGo/Sweets and BLK-9007 to MarketRush/Pooja Items. Check BLK-9002 resolves to FreshGo/Pooja Items for the mapped Sambhaji Nagar city.
  3. Make a temporary two-group delivered summary. You can filter to each status and platform for a manual check, or use criteria formulas such as SUMIFS and COUNTIFS on the Table. The FreshGo delivered amount is ₹2,509 across six and MarketRush is ₹2,190 across four. Confirm the two groups add back to ten delivered orders and ₹4,699.
  4. On the scratch copy replace PN02 on BLK-9007 with ZZ01. Verify Platform gives Review store or an unmatched diagnosis. The row still exists in the review view. If it were prematurely included in a delivered platform split, ₹1,040 would now be unclassified, and MarketRush would show only ₹1,150 across three recognized deliveries.
  5. Use a second scratch test with PN01 rather than ZZ01. The platform lookup returns FreshGo and the city still agrees. Check the expected Area from that directory row is Kothrud, while BLK-9007 is Baner. The separate area check detects the contradiction.
  6. Restore PN02 on the scratch copy or return to the saved baseline. Reconfirm valid keys, recognized labels and platform totals. Record which test recovered because of missing lookup evidence and which required a business consistency check.

Expected result. Derived columns add descriptions to existing orders without changing their approved membership or recorded amounts. An unmatched key is visible. A matching but incorrect key can be investigated with an independent attribute check. The exact field paths are concrete enough for a teammate to reproduce.

Troubleshoot. If PN02 and PN01 return the same platform, inspect the lookup key, the actual reference row and the return column. If only some order rows have a formula, check that the calculated column filled without exceptions. If the order count grew after a query merge, compare expanded result membership and right-hand duplicate keys before trusting any total.

Finish. Save the clean tested workbook with the lookup results intact. Keep any intentional defects in a clearly labeled scratch file. The reference Tables in the main workbook should stay identical to the supplied practice lists.

Lab 2 · Test all fee boundaries and city target scope

Prerequisites. Use a working tblFees and tblTargets in the same local workbook. Make a separate FeeTests worksheet. Do not modify the approved amounts while you test isolated values. If you use the INDEX and MATCH fallback, sort the complete fee Table by its minimum field and verify the resulting pairs.

  1. Test ₹0, ₹98 and ₹99. Expect ₹30, ₹30 and ₹25. These three cases show the minimum boundary, a value between tiers and an exact boundary.
  2. Test ₹198, ₹199, ₹498, ₹499 and ₹500. Expect ₹25, ₹15, ₹15, ₹0 and ₹0. Include one negative amount and one text value in a separate diagnostic row. The negative amount falls below the schedule, and a text amount should request input review rather than receive a fee.
  3. Use the verified formula to fill Delivery Fee Estimate. Check examples on SourceRow 1 ₹450 → ₹15, SourceRow 2 ₹1,299 → ₹0 and SourceRow 4 ₹120 → ₹25. After filling, check twelve numeric fee results and approved-all-status fee total ₹175.
  4. Calculate the separate delivered-only fee estimate using an explicit status condition. Expect ₹145. Check the two excluded ₹15 estimates account for the difference. Confirm the independent recorded delivered total still uses the Amount column and remains ₹4,699.
  5. Set up six city summary keys. Retrieve the six targets with exact lookups. Verify one row for Pune at ₹1,800 and one for Kolhapur at ₹800. These are cities with different numbers and amounts of observed orders. Percentages in the partial-month sample should be about 89.44% and 107.50%, respectively.
  6. Temporarily misspell Pune in a scratch target summary. A deliberate Review target result is more useful than a false 0% or an apparently successful blank. Restore the canonical label. Check all six target values total ₹5,000 once before reporting the overall 93.98% progress.

Expected result. The fee formula switches at the correct boundaries and preserves known zero fees. The target is used once at its declared grain. The report keeps different monetary populations separate rather than assuming every sum expects the same filter.

Troubleshoot. If the fee test returns the larger threshold below an exact boundary, compare the match argument with the teaching rule and verify the actual tier pairs. If a fallback returns incorrect intermediate thresholds, inspect sort order and numeric types. If total target is inflated, check whether the formula was summed across detailed order rows.

Finish. Keep a small FeeTests grid alongside the two scope controls. Unrelated scratch negative values do not belong in your approved order table.

Audit the outputs before building the PivotTables

Write the exact proof checks beside the control table, so they still work after you move tabs around. One check can compare order count before and after enrichment. A second compares sum of recorded amount. A third counts one recognized platform and category per published key, and a fourth checks city, area and store consistency. Each test should identify its relevant source fields when it fails.

Use a small deliberate change to learn which result is sensitive. If one order keeps its amount but changes platforms, the overall delivered sum stays constant while two platform totals move in opposite directions. For example, shifting the ₹1,040 BLK-9007 row to the wrong platform would give FreshGo ₹3,549 and MarketRush ₹1,150. The city total can remain identical, so a test of the top card alone cannot catch this. Keep at least one subgroup control that proves the new enriched values are correct.

Prepare a verification note the analysis stage can use

  • State the approved Orders source as of this exercise stage, with 12 rows and unique order keys. List the directory names, their meaningful keys and current record counts.
  • Identify three exact lookups by purpose and one fee band lookup by condition. Include what should happen when a previously unseen key arrives.
  • Record independent small controls for the two platforms, and choose a specific city and product to check if a later PivotTable presents an unexpected label.
  • Retain recognizable date and status controls. Enrichment populates descriptions but does not change the time coverage or the disposition of the two replays and pending amount.
  • Be explicit about static references versus periodically revised policies. A product name or store key can be stable within this exercise while real directory attributes might depend on effective dates.

Separate a directory correction from a change over time

Imagine PN02 changes platform on 1 October. One current store list could be correct for October and still give a misleading answer for September if it is used retrospectively. To keep historical reporting meaningful, either retain the verified directory snapshot associated with each extract or model the effective period explicitly. In a period-aware model, the two transactions can share a store ID and have different valid platforms. They still have only one eligible match under the effective-period rule. This reasoning applies to categories, targets and the fee policy too.

Draw two examples on the checks sheet. For a September purchase from PN02 the baseline lookup remains MarketRush under the recorded September directory. A hypothetical October example may use a separately approved October label. Avoid editing the baseline directory simply to simulate that decision. Use a second scratch directory and compare the later result only for October's record. Keep the September snapshot and its expected group totals. This small test shows why some received reference copies should be versioned along with the received fact data.

A true correction is different. If the data owner verifies that the September label was entered incorrectly, the original version and its replacement answer a different history of edits. Document which outputs change and which should stay fixed. A corrected platform can move a ₹1,040 order between two group subtotals while the eligible amount stays ₹4,699. A changed recorded amount would intentionally alter those values. Plan two different reconciliation tests rather than describing any changed grouping as an accounting discrepancy.

Inspect the formula from both sides of the relationship

On a worksheet without a calculated Table column, a lookup using the current row's Store ID often relies on a relative reference such as G2 copied to G3. Its key and return lists, in contrast, must still point to the full directory when the row changes. A Table reference can make this easier to see. In the project formula, a moved or expanded directory must still have aligned Store ID and Platform columns. Keep them in the same Table and select them by name to trace both positions.

When you compare Table behavior after an update, inspect the input value on one appended row and the resulting formula. A cell can look correct because a prior analyst pasted a platform value manually. Formula inspection and a test of a changed key in a scratch copy distinguish current calculation from an old literal. If the reference count is right but one established key gives the wrong field, check the return range before increasing the search range or changing case.

  • A last-row test checks whether an append actually became part of the Table. Data typed below an existing range may or may not be included in the expected source depending on how it was entered and the app settings. Inspect the Table boundary and row count.
  • A rename test checks the intended field through its whole path. The display title in a report can change freely, but a calculation must still refer to the actual Platform or Category data field it was designed to use.
  • A key coverage test checks which values remain unmatched after a reference update. Write the missing Store ID and current SourceRow alongside the count.
  • A selected subtotal test checks the branch of the report that relies on the derived value. Use the two platforms or two clean categories rather than only the headline amount.

When updating from a new input, confirm the formulas evaluate for the actual new rows. If the lookup logic has moved into the query, check the loaded output after refresh. If it remains in the workbook, verify that calculated-column behavior, manual edits and references continued to align. Recheck distinct order keys and total instead of accepting a refresh timestamp as success. Finish by handing off tblOrders with recognized approved rows to the PivotTable analysis lesson.

Recall without scrolling. Give an example where exact match is required, one where a next-smaller match is useful, and another where a successful exact match can still be wrong for the transaction.

Check the paper expansion exercise

Duplicating the ₹450 and ₹120 PN01 records adds ₹570. A merge with two PN01 matches gives ₹2,180 across five expanded rows for the original three-order test.

Check the missing key and wrong valid key contrast

ZZ01 raises an unmatched result. PN01 matches but points to a different area and platform from the intended PN02 record. Independently compare the store attributes and original order evidence.

Check the fee boundary at the top of the supplied range

₹498 reaches the ₹199 threshold and has an estimate of ₹15. ₹499 reaches the final minimum and its estimate is zero.

Check change impact when a product reference price is updated

Qty × the new reference amount can move a comparison figure. The recorded amount remains the value provided by the approved order until its source is formally corrected.

Quiz · Choose the comparison that fits the question

1. Which field should look up Platform? A. City. B. Store ID. C. Amount.

B. Store ID has one directory row. Two stores in the same city can use different platforms.

2. In XLOOKUP, what does match mode −1 do here? A. Reverse the search. B. Exact match or next smaller. C. Largest fee first.

B. The fifth argument describes the match. A different optional argument specifies reverse search.

3. Which fee is expected at ₹199? A. ₹25. B. ₹30. C. ₹15.

C. ₹199 meets the new minimum exactly and enters its associated fee band.

4. Which condition should stop publishing a platform breakdown? A. A known zero fee. B. A missing store match. C. More than one city in the Table.

B. A missing store match leaves its order's platform unresolved. A valid zero fee is a recognized estimate and a multi-city source is intended.

5. How often is Pune's monthly target included in its total? A. Once per Pune order. B. Once for the city and target period. C. Once for every listed SKU.

B. The target belongs to a city and comparison period, regardless of the number of transaction lines.

6. What detects a duplicated directory key before a merge expands it? A. Counting right-side matches per order. B. Changing all labels to uppercase. C. Watching the filter button.

A. More than one matching directory row is a cardinality problem that can expand the transaction count and amount.

Interview practice

Why did you use multiple Tables?
Orders and directories have different grains. Separating them makes each key and business rule visible and helps verify that enrichment added labels without changing transaction counts.
When is an approximate lookup appropriate?
When the policy is expressed as eligible numerical bands, such as the largest minimum reached by an amount. I use exact matching for store IDs and product keys.
How can an exact match give a wrong business assignment?
The input key could be valid but attached to the wrong order, or the directory could contain several conflicting matches. I verify the input, key uniqueness and relevant independent attributes.
How do you detect inflation introduced by a merge?
I confirm a single right-side match for each approved order, then reconcile row and distinct order counts and recorded amount after expanding.
Why compare a fee model and amount in separate columns?
The fee is derived from a sample schedule. The Amount column contains a recorded value. Different business scopes can require different money fields and different status treatment.
How would you debug a target attainment percentage over 100%?
I would first confirm the matched city, target period, and one target per summary. Then I would recompute observed eligible amount against that target. Greater than 100% can be legitimate, as in the fictional Kolhapur example.

Revision cards

  • Current row. An at sign in a Table formula lets the lookup use the key from that order.
  • Exact relationship. Unique store keys identify where a recorded purchase belongs. Missing or repeated keys need review.
  • Threshold rule. Choose the exact or next smaller minimum for the fee, including the boundary itself.
  • Numeric evidence. A zero fee is valid. A missing input or lookup needs a separate visible outcome.
  • Stable grain. Enrichment should not change approved order count or recorded amount.
  • City target. Each city and period target is included once when comparing the chosen scope.

Official sources

Continue practising: explore the existing Excel Task Hub for additional exercises.