NEW TICKET#20 · Reports
Revenue by month
Lena Fischer · Finance & Ops
Opened today
“Our accountant wants revenue per month for the quarterly report: only paid invoices, counted in the month they were paid. Last time, March was simply missing from the report because nothing was paid that month, and she thought we'd lost data. Every month in the range has to be there, with 0 when nothing came in. Hannah already wrote nextMonth, which turns "2026-12" into "2027-01". Can you write revenueByMonth?”
YOUR PLAN
- 1Watch an example2 min
- 2Warm-up 11 min
- 3Warm-up 21 min
- 4Fix the ticket16 min
BY THE END YOU CAN
- Group values into an object by a key
- Start every key at 0 before adding, so nothing goes missing
- Walk a range of months with a helper