The request

From Priya Shah, Head of Data
Your goal
Step 1 of 3. In G1 type line_total, and in G2:G40 compute each line's revenue: quantity times unit_price, minus the discount (discount_pct is a percentage).
- Fill
G2:G40with the right valuesnot done yet - With formulas, not typed numbersnot done yet
Step 2 of 3. Build a PivotTable at I1: status in Filter set to completed, category in Rows, line_total in Values as a Sum (keep the A to Z order). It fills I1:J9.
- Fill
I1:J9with the right valuesnot done yet
Step 3 of 3. Fill the headline: M2 the largest category revenue in the pivot (LARGE), M1 that category's name (INDEX/MATCH), M3 its share of the completed total in J9, M4 the second-largest category's name.
- Fill
M1:M4with the right valuesnot done yet - With formulas, not typed numbersnot done yet
- Use
LARGEINDEXMATCHnot done yet
Step 1 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | order_id | category | status | quantity | unit_price | discount_pct | Top category | |||||||
| 2 | 9515 | Outdoor | completed | 1 | 1099.00 | 0 | Its revenue | |||||||
| 3 | 9515 | Outdoor | completed | 2 | 249.00 | 0 | Share of completed revenue | |||||||
| 4 | 9516 | Decor | completed | 2 | 44.99 | 0 | Runner-up | |||||||
| 5 | 9516 | Decor | completed | 4 | 15.99 | 0 | ||||||||
| 6 | 9517 | Outdoor | completed | 4 | 50.99 | 0 | ||||||||
| 7 | 9517 | Textiles | completed | 1 | 28.99 | 0 | ||||||||
| 8 | 9518 | Outdoor | completed | 1 | 93.99 | 0 | ||||||||
| 9 | 9519 | Outdoor | completed | 2 | 72.99 | 0 | ||||||||
| 10 | 9520 | Decor | completed | 1 | 19.99 | 0 | ||||||||
| 11 | 9521 | Textiles | completed | 1 | 169.00 | 0 | ||||||||
| 12 | 9521 | Textiles | completed | 1 | 20.99 | 0 | ||||||||
| 13 | 9521 | Outdoor | completed | 1 | 53.99 | 0 | ||||||||
| 14 | 9522 | Decor | completed | 1 | 25.99 | 10 | ||||||||
| 15 | 9522 | Textiles | completed | 1 | 28.99 | 10 | ||||||||
| 16 | 9522 | Outdoor | completed | 2 | 93.99 | 10 | ||||||||
| 17 | 9523 | Textiles | completed | 2 | 52.99 | 0 | ||||||||
| 18 | 9523 | Outdoor | completed | 3 | 379.00 | 0 | ||||||||
| 19 | 9524 | Textiles | completed | 1 | 52.99 | 0 | ||||||||
| 20 | 9524 | Decor | completed | 1 | 19.99 | 0 | ||||||||
| 21 | 9524 | Outdoor | completed | 1 | 53.99 | 0 | ||||||||
| 22 | 9524 | Decor | completed | 2 | 20.99 | 0 | ||||||||
| 23 | 9525 | Outdoor | completed | 4 | 379.00 | 0 | ||||||||
| 24 | 9526 | Kitchen | completed | 8 | 11.99 | 0 | ||||||||
| 25 | 9526 | Decor | completed | 2 | 19.99 | 0 | ||||||||
| 26 | 9527 | Decor | refunded | 1 | 104.99 | 0 | ||||||||
| 27 | 9528 | Outdoor | completed | 1 | 50.99 | 0 | ||||||||
| 28 | 9528 | Outdoor | completed | 1 | 289.00 | 0 | ||||||||
| 29 | 9528 | Textiles | completed | 1 | 17.99 | 0 | ||||||||
| 30 | 9529 | Lighting | cancelled | 2 | 109.00 | 0 | ||||||||
| 31 | 9529 | Kitchen | cancelled | 2 | 10.99 | 0 | ||||||||
| 32 | 9529 | Textiles | cancelled | 1 | 30.99 | 0 | ||||||||
| 33 | 9529 | Decor | cancelled | 2 | 20.99 | 0 | ||||||||
| 34 | 9529 | Lighting | cancelled | 2 | 29.99 | 0 | ||||||||
| 35 | 9529 | Kitchen | cancelled | 2 | 11.99 | 0 | ||||||||
| 36 | 9530 | Textiles | completed | 1 | 70.99 | 0 | ||||||||
| 37 | 9530 | Decor | completed | 3 | 109.00 | 0 | ||||||||
| 38 | 9530 | Kitchen | completed | 1 | 53.99 | 0 | ||||||||
| 39 | 9530 | Lighting | completed | 4 | 51.99 | 0 | ||||||||
| 40 | 9530 | Outdoor | completed | 2 | 53.99 | 0 | ||||||||
| 41 | ||||||||||||||
| 42 | ||||||||||||||
| 43 | ||||||||||||||
| 44 | ||||||||||||||
| 45 |
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 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | order_id | category | status | quantity | unit_price | discount_pct | line_total | Top category | ||||||
| 2 | 9515 | Outdoor | completed | 1 | 1099.00 | 0 | 1,099.00 | Its revenue | ||||||
| 3 | 9515 | Outdoor | completed | 2 | 249.00 | 0 | 498.00 | Share of completed revenue | ||||||
| 4 | 9516 | Decor | completed | 2 | 44.99 | 0 | 89.98 | Runner-up | ||||||
| 5 | 9516 | Decor | completed | 4 | 15.99 | 0 | 63.96 | |||||||
| 6 | 9517 | Outdoor | completed | 4 | 50.99 | 0 | 203.96 | |||||||
| 7 | 9517 | Textiles | completed | 1 | 28.99 | 0 | 28.99 | |||||||
| 8 | 9518 | Outdoor | completed | 1 | 93.99 | 0 | 93.99 | |||||||
| 9 | 9519 | Outdoor | completed | 2 | 72.99 | 0 | 145.98 | |||||||
| 10 | 9520 | Decor | completed | 1 | 19.99 | 0 | 19.99 | |||||||
| 11 | 9521 | Textiles | completed | 1 | 169.00 | 0 | 169.00 | |||||||
| 12 | 9521 | Textiles | completed | 1 | 20.99 | 0 | 20.99 | |||||||
| 13 | 9521 | Outdoor | completed | 1 | 53.99 | 0 | 53.99 | |||||||
| 14 | 9522 | Decor | completed | 1 | 25.99 | 10 | 23.39 | |||||||
| 15 | 9522 | Textiles | completed | 1 | 28.99 | 10 | 26.09 | |||||||
| 16 | 9522 | Outdoor | completed | 2 | 93.99 | 10 | 169.18 | |||||||
| 17 | 9523 | Textiles | completed | 2 | 52.99 | 0 | 105.98 | |||||||
| 18 | 9523 | Outdoor | completed | 3 | 379.00 | 0 | 1,137.00 | |||||||
| 19 | 9524 | Textiles | completed | 1 | 52.99 | 0 | 52.99 | |||||||
| 20 | 9524 | Decor | completed | 1 | 19.99 | 0 | 19.99 | |||||||
| 21 | 9524 | Outdoor | completed | 1 | 53.99 | 0 | 53.99 | |||||||
| 22 | 9524 | Decor | completed | 2 | 20.99 | 0 | 41.98 | |||||||
| 23 | 9525 | Outdoor | completed | 4 | 379.00 | 0 | 1,516.00 | |||||||
| 24 | 9526 | Kitchen | completed | 8 | 11.99 | 0 | 95.92 | |||||||
| 25 | 9526 | Decor | completed | 2 | 19.99 | 0 | 39.98 | |||||||
| 26 | 9527 | Decor | refunded | 1 | 104.99 | 0 | 104.99 | |||||||
| 27 | 9528 | Outdoor | completed | 1 | 50.99 | 0 | 50.99 | |||||||
| 28 | 9528 | Outdoor | completed | 1 | 289.00 | 0 | 289.00 | |||||||
| 29 | 9528 | Textiles | completed | 1 | 17.99 | 0 | 17.99 | |||||||
| 30 | 9529 | Lighting | cancelled | 2 | 109.00 | 0 | 218.00 | |||||||
| 31 | 9529 | Kitchen | cancelled | 2 | 10.99 | 0 | 21.98 | |||||||
| 32 | 9529 | Textiles | cancelled | 1 | 30.99 | 0 | 30.99 | |||||||
| 33 | 9529 | Decor | cancelled | 2 | 20.99 | 0 | 41.98 | |||||||
| 34 | 9529 | Lighting | cancelled | 2 | 29.99 | 0 | 59.98 | |||||||
| 35 | 9529 | Kitchen | cancelled | 2 | 11.99 | 0 | 23.98 | |||||||
| 36 | 9530 | Textiles | completed | 1 | 70.99 | 0 | 70.99 | |||||||
| 37 | 9530 | Decor | completed | 3 | 109.00 | 0 | 327.00 | |||||||
| 38 | 9530 | Kitchen | completed | 1 | 53.99 | 0 | 53.99 | |||||||
| 39 | 9530 | Lighting | completed | 4 | 51.99 | 0 | 207.96 | |||||||
| 40 | 9530 | Outdoor | completed | 2 | 53.99 | 0 | 107.98 | |||||||
| 41 | ||||||||||||||
| 42 | ||||||||||||||
| 43 | ||||||||||||||
| 44 | ||||||||||||||
| 45 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
Step 3 · your sheet
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | order_id | category | status | quantity | unit_price | discount_pct | line_total | status | completed | Top category | |||||
| 2 | 9515 | Outdoor | completed | 1 | 1099.00 | 0 | 1,099.00 | Its revenue | |||||||
| 3 | 9515 | Outdoor | completed | 2 | 249.00 | 0 | 498.00 | category | Sum of line_total | Share of completed revenue | |||||
| 4 | 9516 | Decor | completed | 2 | 44.99 | 0 | 89.98 | Decor | 626.27 | Runner-up | |||||
| 5 | 9516 | Decor | completed | 4 | 15.99 | 0 | 63.96 | Kitchen | 149.91 | ||||||
| 6 | 9517 | Outdoor | completed | 4 | 50.99 | 0 | 203.96 | Lighting | 207.96 | ||||||
| 7 | 9517 | Textiles | completed | 1 | 28.99 | 0 | 28.99 | Outdoor | 5,419.06 | ||||||
| 8 | 9518 | Outdoor | completed | 1 | 93.99 | 0 | 93.99 | Textiles | 493.02 | ||||||
| 9 | 9519 | Outdoor | completed | 2 | 72.99 | 0 | 145.98 | Grand Total | 6,896.22 | ||||||
| 10 | 9520 | Decor | completed | 1 | 19.99 | 0 | 19.99 | ||||||||
| 11 | 9521 | Textiles | completed | 1 | 169.00 | 0 | 169.00 | ||||||||
| 12 | 9521 | Textiles | completed | 1 | 20.99 | 0 | 20.99 | ||||||||
| 13 | 9521 | Outdoor | completed | 1 | 53.99 | 0 | 53.99 | ||||||||
| 14 | 9522 | Decor | completed | 1 | 25.99 | 10 | 23.39 | ||||||||
| 15 | 9522 | Textiles | completed | 1 | 28.99 | 10 | 26.09 | ||||||||
| 16 | 9522 | Outdoor | completed | 2 | 93.99 | 10 | 169.18 | ||||||||
| 17 | 9523 | Textiles | completed | 2 | 52.99 | 0 | 105.98 | ||||||||
| 18 | 9523 | Outdoor | completed | 3 | 379.00 | 0 | 1,137.00 | ||||||||
| 19 | 9524 | Textiles | completed | 1 | 52.99 | 0 | 52.99 | ||||||||
| 20 | 9524 | Decor | completed | 1 | 19.99 | 0 | 19.99 | ||||||||
| 21 | 9524 | Outdoor | completed | 1 | 53.99 | 0 | 53.99 | ||||||||
| 22 | 9524 | Decor | completed | 2 | 20.99 | 0 | 41.98 | ||||||||
| 23 | 9525 | Outdoor | completed | 4 | 379.00 | 0 | 1,516.00 | ||||||||
| 24 | 9526 | Kitchen | completed | 8 | 11.99 | 0 | 95.92 | ||||||||
| 25 | 9526 | Decor | completed | 2 | 19.99 | 0 | 39.98 | ||||||||
| 26 | 9527 | Decor | refunded | 1 | 104.99 | 0 | 104.99 | ||||||||
| 27 | 9528 | Outdoor | completed | 1 | 50.99 | 0 | 50.99 | ||||||||
| 28 | 9528 | Outdoor | completed | 1 | 289.00 | 0 | 289.00 | ||||||||
| 29 | 9528 | Textiles | completed | 1 | 17.99 | 0 | 17.99 | ||||||||
| 30 | 9529 | Lighting | cancelled | 2 | 109.00 | 0 | 218.00 | ||||||||
| 31 | 9529 | Kitchen | cancelled | 2 | 10.99 | 0 | 21.98 | ||||||||
| 32 | 9529 | Textiles | cancelled | 1 | 30.99 | 0 | 30.99 | ||||||||
| 33 | 9529 | Decor | cancelled | 2 | 20.99 | 0 | 41.98 | ||||||||
| 34 | 9529 | Lighting | cancelled | 2 | 29.99 | 0 | 59.98 | ||||||||
| 35 | 9529 | Kitchen | cancelled | 2 | 11.99 | 0 | 23.98 | ||||||||
| 36 | 9530 | Textiles | completed | 1 | 70.99 | 0 | 70.99 | ||||||||
| 37 | 9530 | Decor | completed | 3 | 109.00 | 0 | 327.00 | ||||||||
| 38 | 9530 | Kitchen | completed | 1 | 53.99 | 0 | 53.99 | ||||||||
| 39 | 9530 | Lighting | completed | 4 | 51.99 | 0 | 207.96 | ||||||||
| 40 | 9530 | Outdoor | completed | 2 | 53.99 | 0 | 107.98 | ||||||||
| 41 | |||||||||||||||
| 42 | |||||||||||||||
| 43 | |||||||||||||||
| 44 | |||||||||||||||
| 45 |
Loading the editor…
Reference solution
Mote checks your result
Press Check. Each right cell becomes a firefly in your lantern.
What Priya gets, and why
The lesson
One day, three layers
A useful sales note has three layers: the lines (what happened), a summary (where the money
went) and a headline (what to say first). This boss builds all three on Monday, May 12, 2025:
39 order lines in A1:F40, completed, cancelled and refunded mixed together.
Step 1: a field to add up
The export has quantity, price and discount but no revenue. A PivotTable can only summarise a field that exists, so first add one:
G1 line_total
G2 =D2*E2*(1-F2/100)
Filled down to G40. With a header and no gap, column G becomes part of the pivot’s source,
just as it would in Excel if the data were a Table (Ctrl+T). In Excel you could also add a
calculated field instead, but a helper column is visible and easy to check.
Step 2: completed revenue by category
Status belongs in Filter: the question is about completed sales only, not a split by status.
Filter status = completed
Rows category
Values Sum of line_total
status completed
category Sum of line_total
Decor 626.27
Kitchen 149.91
Lighting 207.96
Outdoor 5,419.06
Textiles 493.02
Grand Total 6,896.22
Without the filter the Grand Total would be 7,398.12: the six cancelled lines (396.91) and one refunded line (104.99) would count as sales.
Step 3: the headline, read from the pivot
The pivot’s values are ordinary cells, so formulas can read them. Keep the rows in A→Z order and let the formulas find the winner, so the headline doesn’t depend on how the pivot is sorted:
M2 =LARGE(J4:J8,1) biggest category revenue
M1 =INDEX(I4:I8,MATCH(M2,J4:J8,0)) the label next to it
M3 =M2/J9 share of the Grand Total
M4 =INDEX(I4:I8,MATCH(LARGE(J4:J8,2),J4:J8,0))
LARGE(range, k) returns the k-th largest value, so k = 2 is the runner-up. MATCH(…, 0)
finds its position and INDEX returns the category in the same position, the same pair you met
in chapter 2.
In Excel, clicking a pivot cell while typing a formula inserts a GETPIVOTDATA(…) call instead
of J4. It reads a value by field name, so it survives a re-sorted pivot; plain references like
J4:J8 are easier to read and are what this sheet supports. You can switch the habit off under
PivotTable Analyze → Options → Generate GetPivotData.
Thinking like an analyst
Outdoor at 78.6% of a Monday in May is the start of patio season, not a one-off: the next ticket would compare the same weekday across April and June. And the 501.90 of cancelled or refunded lines is worth one sentence in the note, because it is the difference between the till and the sales report.
Common mistakes
- Putting status in Rows instead of Filter: the table splits into three lines per category.
- A helper column without a header, which the pivot can’t see.
- Typing 5,419.06 into M2: the headline goes stale the moment the pivot changes.
MATCHwithout the0: an approximate match on unsorted numbers returns the wrong category.
Lantern lit!
Practised: pivot tableshelper columnreport filterlargeindex match
- Solved
- No hints
- First run
