{"id":"data2-pivot-summary-q1-spend-table","audience":"finance","category":"spreadsheets","track":"data","technique":"format","level":"intermediate","title":"Build a Q1 spend summary table by department","free":false,"task":"Your finance lead wants a pivot-style summary of Q1 spend. Make one markdown table with a row per department and columns Jan, Feb, Mar and Q1 total, plus a Total row at the bottom, all in dollars like $4,200, under 90 words. Leave out voided rows and repeated invoice numbers, and put nothing before or after the table.","materialLabel":"Ledger export (attached to your prompt automatically)","material":"Ledger export - Q1 spend by department (Fernhill Foods)\n\nDept | Month | Invoice | Amount | Status\nSales | Jan | INV-701 | 4,200 | posted\nSales | Feb | INV-733 | 3,800 | posted\nSales | Mar | INV-760 | 4,000 | posted\nOps | Jan | INV-702 | 6,100 | posted\nOps | Feb | INV-734 | 5,900 | posted\nOps | Feb | INV-740 | 900 | VOID\nOps | Mar | INV-761 | 6,300 | posted\nSupport | Jan | INV-703 | 2,000 | posted\nSupport | Feb | INV-735 | 2,200 | posted\nSupport | Mar | INV-882 | 2,500 | posted\nSupport | Mar | INV-882 | 2,500 | posted\n\nExport note: exported Apr 2 by the AP system. The system sometimes posts the same invoice twice when a payment retries. All amounts are in US dollars.","rules":[{"type":"maxWords","max":90},{"type":"plainText"}],"mistakes":[{"title":"Counting void and repeats","why":"The AI adds every row, including the voided $900 and the invoice posted twice.","fix":"Add: \"Skip VOID rows and count a repeated invoice number once.\"","checks":["r0"]},{"title":"Forgetting the Total row","why":"The AI stops at department rows or adds only a grand total.","fix":"Add: \"End with a Total row for Jan, Feb, Mar and Q1.\"","checks":["r1"]},{"title":"Wrapping the table in chatter","why":"The AI adds an intro and a list of observations.","fix":"Add: \"Output only the table, no text before or after.\"","checks":["r2"]},{"title":"Leaving the format to chance","why":"The AI picks its own length and layout unless told the exact shape.","fix":"Add: \"Plain text, no bold or headings.\"","checks":["plainText"]},{"title":"Trusting the AI to count words","why":"AI is bad at counting. Ask for a total word limit and it often lands over it.","fix":"Cap each part instead, for example \"each line under 15 words.\"","checks":["maxWords"]}],"promptHints":[{"label":"Names the columns","patterns":["dept ?\\|","columns?","jan","q1 total"]},{"label":"Excludes void rows","patterns":["void","skip","exclude"]},{"label":"Handles repeated invoices","patterns":["invoice","twice","repeated","duplicate","once"]},{"label":"Asks for a total row","patterns":["total row","totals row","final row"]},{"label":"Sets the money format","patterns":["\\$","dollars","commas"]}],"hint":"Ledger exports hide junk rows. Name the exclusions, the columns and the money format, and say there is nothing outside the table.","mission":"Summarize Q1 spend by department for your finance lead.","musts":["One table, totals row","Skip void and repeated rows","Dollars with commas"],"rubricLabels":["The department rows show Q1 totals of $12,000 for Sales, $18,300 for Ops and $6,700 for Support (so the voided $900 and the repeated INV-882 are left out)","The Total row shows Jan $12,300, Feb $11,900, Mar $12,800 and a grand total of $37,000","The output is a single markdown table with columns Dept, Jan, Feb, Mar and Q1 total, amounts use $ and commas, and there is no text before or after the table"]}