Build a report
Say four things
- The question. "How are sign-ups doing this quarter?"
- The data. The table or tables, if you know them. If not: "Find the table that holds sign-ups first."
- The figures. What to count or add up, and how: "sign-ups, and the share that became paying within 30 days".
- The period. By week or by month, and whether it follows the date filter.
For example:
"Make a report called Sign-ups on the signups table. Tiles for this period's sign-ups and conversion rate, a line chart of both by week, and a table by country. Follow the date filter. In the (i), say that conversion means paying within 30 days."
What Claude does
- Looks at the table's columns on your database.
- Writes
app/src/reports/<id>/report.tsxand a.sqlfile per query: the report's name, its queries, the blocks and the dialog. - Runs the checks, including each block's columns against its query's row.
- Opens the report and tells you what is on it.
Pick the right block
Ask for what you want to see; Claude picks the block. If you want a particular one, name it. The whole list, with when to use each, is in Components.
Check the figures
Compare one figure with a number you trust. If it is off, say what you expected and where your number comes from. Claude reads the SQL and explains the difference, then fixes it or writes the rule into the dialog.
Several pages
A long report can be split into pages, each its own file
(report.<page>.md) in the same folder. Ask: "Split this report into an
overview page and a page per region."