The request

From Laura Bennett, Head of Finance
Your goal
Step 1 of 2. Check the discounts. In F2:F22, compute the share of the gross that was discounted: 1 minus net divided by gross (one formula, filled down). In G2:G22, the discount cost: gross minus net. Then in J2 return the highest rate with MAX, and in J3 count the rows with a rate of 0 with COUNTIF.
- Fill
F2:G22, J2:J3with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
MAXCOUNTIFnot done yet
Step 2 of 2. Build the summary. In J7:J13, total the orders of the coupon named in I7:I13 with SUMIFS (one formula, filled down, with the data ranges locked). Do the same for revenue (net, column E) in K7:K13 and discount cost (column G) in M7:M13. In L7:L13, the AOV: revenue divided by orders. In J14, K14 and M14, the column totals with SUM. In N7:N13, each coupon's share of total revenue: K7 divided by $K$14.
- Fill
J7:N13, J14:K14, M14with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
SUMIFSSUMnot done yet
This case unlocks when you finish any one of:
- SQL · Aggregates and GROUP BY
- Python · New columns, groupby and aggregation
- Excel · Conditional totals
The ticket and lesson are open to read now. Solve every level in one of those chapters, in whichever track you prefer, and this case opens.
Step 1 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | coupon | year | orders | gross | net | discount_rate | discount_cost | ||||||||
| 2 | BFCM25 | 2023 | 79 | 42595.90 | 31946.93 | Highest discount rate | |||||||||
| 3 | BFCM25 | 2024 | 126 | 69340.11 | 52005.08 | Rows with no discount | |||||||||
| 4 | BFCM25 | 2025 | 107 | 55464.56 | 41598.42 | ||||||||||
| 5 | FREESHIP | 2023 | 46 | 25264.15 | 25264.15 | ||||||||||
| 6 | FREESHIP | 2024 | 56 | 33994.88 | 33994.88 | coupon | orders | revenue | aov | discount_cost | revenue_share | ||||
| 7 | FREESHIP | 2025 | 79 | 52723.02 | 52723.02 | BFCM25 | |||||||||
| 8 | HOLIDAY20 | 2023 | 42 | 20814.15 | 16651.32 | FREESHIP | |||||||||
| 9 | HOLIDAY20 | 2024 | 56 | 27151.91 | 21721.53 | HOLIDAY20 | |||||||||
| 10 | HOLIDAY20 | 2025 | 76 | 36047.34 | 28837.87 | SPRING15 | |||||||||
| 11 | SPRING15 | 2023 | 35 | 19177.81 | 16301.14 | SUMMER15 | |||||||||
| 12 | SPRING15 | 2024 | 58 | 29931.46 | 25441.74 | WELCOME10 | |||||||||
| 13 | SPRING15 | 2025 | 77 | 58771.56 | 49955.83 | none | |||||||||
| 14 | SUMMER15 | 2023 | 46 | 40342.11 | 34290.79 | Total | |||||||||
| 15 | SUMMER15 | 2024 | 69 | 46075.59 | 39164.25 | ||||||||||
| 16 | SUMMER15 | 2025 | 85 | 47931.56 | 40741.83 | ||||||||||
| 17 | WELCOME10 | 2023 | 199 | 102015.08 | 91813.57 | ||||||||||
| 18 | WELCOME10 | 2024 | 140 | 69281.95 | 62353.75 | ||||||||||
| 19 | WELCOME10 | 2025 | 193 | 96684.22 | 87015.80 | ||||||||||
| 20 | none | 2023 | 2434 | 1384263.50 | 1384263.50 | ||||||||||
| 21 | none | 2024 | 3168 | 1759394.03 | 1759394.03 | ||||||||||
| 22 | none | 2025 | 3678 | 2000817.38 | 2000817.38 | ||||||||||
| 23 | |||||||||||||||
| 24 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
Step 2 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | coupon | year | orders | gross | net | discount_rate | discount_cost | ||||||||
| 2 | BFCM25 | 2023 | 79 | 42595.90 | 31946.93 | 25.0% | 10648.97 | Highest discount rate | 25.0% | ||||||
| 3 | BFCM25 | 2024 | 126 | 69340.11 | 52005.08 | 25.0% | 17335.03 | Rows with no discount | 6 | ||||||
| 4 | BFCM25 | 2025 | 107 | 55464.56 | 41598.42 | 25.0% | 13866.14 | ||||||||
| 5 | FREESHIP | 2023 | 46 | 25264.15 | 25264.15 | 0.0% | 0.00 | ||||||||
| 6 | FREESHIP | 2024 | 56 | 33994.88 | 33994.88 | 0.0% | 0.00 | coupon | orders | revenue | aov | discount_cost | revenue_share | ||
| 7 | FREESHIP | 2025 | 79 | 52723.02 | 52723.02 | 0.0% | 0.00 | BFCM25 | |||||||
| 8 | HOLIDAY20 | 2023 | 42 | 20814.15 | 16651.32 | 20.0% | 4162.83 | FREESHIP | |||||||
| 9 | HOLIDAY20 | 2024 | 56 | 27151.91 | 21721.53 | 20.0% | 5430.38 | HOLIDAY20 | |||||||
| 10 | HOLIDAY20 | 2025 | 76 | 36047.34 | 28837.87 | 20.0% | 7209.47 | SPRING15 | |||||||
| 11 | SPRING15 | 2023 | 35 | 19177.81 | 16301.14 | 15.0% | 2876.67 | SUMMER15 | |||||||
| 12 | SPRING15 | 2024 | 58 | 29931.46 | 25441.74 | 15.0% | 4489.72 | WELCOME10 | |||||||
| 13 | SPRING15 | 2025 | 77 | 58771.56 | 49955.83 | 15.0% | 8815.73 | none | |||||||
| 14 | SUMMER15 | 2023 | 46 | 40342.11 | 34290.79 | 15.0% | 6051.32 | Total | |||||||
| 15 | SUMMER15 | 2024 | 69 | 46075.59 | 39164.25 | 15.0% | 6911.34 | ||||||||
| 16 | SUMMER15 | 2025 | 85 | 47931.56 | 40741.83 | 15.0% | 7189.73 | ||||||||
| 17 | WELCOME10 | 2023 | 199 | 102015.08 | 91813.57 | 10.0% | 10201.51 | ||||||||
| 18 | WELCOME10 | 2024 | 140 | 69281.95 | 62353.75 | 10.0% | 6928.20 | ||||||||
| 19 | WELCOME10 | 2025 | 193 | 96684.22 | 87015.80 | 10.0% | 9668.42 | ||||||||
| 20 | none | 2023 | 2434 | 1384263.50 | 1384263.50 | 0.0% | 0.00 | ||||||||
| 21 | none | 2024 | 3168 | 1759394.03 | 1759394.03 | 0.0% | 0.00 | ||||||||
| 22 | none | 2025 | 3678 | 2000817.38 | 2000817.38 | 0.0% | 0.00 | ||||||||
| 23 | |||||||||||||||
| 24 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Laura gets, and why
The lesson
What the sheet holds
Priya’s export has one row per coupon and year, completed orders only:
| column | holds |
|---|---|
| A, B | the coupon (none = no code) and the year |
| C | the number of orders |
| D | gross: what the baskets were worth before the discount |
| E | net: what customers paid |
Twenty-one rows: seven codes, three years each. The labels of the summary table are already in I6:N14.
Step 1: does the discount match the code?
The data has the code and the money, so you can work out the discount customers really got and compare it with the one advertised:
F2 =1-E2/D2
G2 =D2-E2
Filled down to row 22, column F should show 25% on every BFCM25 row, 20% on HOLIDAY20 and so on. Two summary cells make the check quick to read:
J2 =MAX(F2:F22)
J3 =COUNTIF(F2:F22,0)
The highest rate should be the biggest code, 25%. The zero rows should be exactly the six with no
discount on the lines: none and FREESHIP, which waives shipping and leaves the basket alone.
Step 2: one summary table
The summary repeats one pattern: a SUMIFS that reads its coupon from column I.
J7 =SUMIFS($C$2:$C$22,$A$2:$A$22,$I7)
The data ranges are locked so they stay put when you fill down, and $I7 lets the row move.
Revenue and discount cost use the same shape on columns E and G. Then the derived columns:
L7 =K7/J7
N7 =K7/$K$14
with the totals in row 14. Fill everything down to row 13.
Reading the result
Coupons brought 12.8% of net revenue and cost $121,785 in discounts. Every code’s AOV is below the $554.36 of orders without one, from $386.27 on HOLIDAY20 to $618.69 on FREESHIP.
Be careful with that comparison. Seasonal codes run in weeks when everybody’s baskets differ, so “coupon AOV below no-coupon AOV” mixes the coupon with the calendar. The SQL and pandas versions of this step compare each code with orders on the same days; in a spreadsheet you would need the daily export to do the same.
Pitfalls
- AOV and share come from totals; never average a column of averages.
#DIV/0!in the share column means the total reference was not locked.- FREESHIP’s real cost is shipping, which is not in this sheet. Say so in the write-up.
Lantern lit!
Practised: data validationpercent changecountifsumifssummary tablemixed references
- Solved
- No hints
- First run
