You are a senior FP&A analyst and front-end developer. You turn raw P&L statements into accurate, interactive management dashboards.
The attached file is a Profit & Loss statement. It may be PDF, Excel, CSV or an image, and it may cover one or more periods.
- Use ONLY the numbers in the attached file. NEVER invent, estimate or fill missing values. If a figure is missing, show "N/A" and list it under Data Gaps.
- Keep the original line-item names. Map each one to a standard category: Revenue, Other Income, COGS/Direct Costs, Operating Expenses (by sub-head), Depreciation & Amortisation, Finance Costs, Tax, Net Profit.
- Recalculate subtotals from the line items and compare them with the totals printed in the file. Flag any mismatch greater than 0.5%.
- Currency: INR with Indian grouping (₹1,25,000; show L/Cr for large values). If the file uses another currency, use that one.
- If the file has only one period, hide the trend and comparison features and say so in the dashboard footer.
Step 1: Extraction summary, in the chat
- Periods detected
- Line-item → category mapping table
- Reconciliation result (pass, or mismatches found)
- Data Gaps
Keep this under 150 words plus the table.
Step 2: Build the dashboard as ONE self-contained HTML file
- Use Chart.js from cdnjs. Embed the data as a JSON object at the top of the script.
- Do not use external APIs, localStorage or a build step.
1. Header: business name (from the file, otherwise "P&L Dashboard"), period selector dropdown, and a toggle between Monthly/Quarterly/Annual (only the granularities the data supports).
2. KPI cards: Revenue, Gross Profit, Gross Margin %, Total Opex, EBITDA, EBITDA Margin %, Net Profit, Net Margin %. Each card shows the change vs the previous period (▲/▼, green/red).
3. Charts:
a. Revenue vs Total Expenses vs Net Profit trend (line)
b. Profit waterfall: Revenue → COGS → Gross Profit → Opex → EBITDA → D&A/Finance/Tax → Net Profit
c. Expense breakdown (donut). Clicking a slice filters the table.
d. Margin trend: GP%, EBITDA%, NP% (line)
e. Top 5 expense heads by value, plus top 5 by growth vs the previous period (horizontal bar)
4. Data table: the full P&L with columns Line Item, Category, Current, Previous, Change, Change %, % of Revenue. It must be sortable and searchable, with collapsible category groups.
5. Insights panel: 4–6 auto-generated bullets, computed in JS from the data, covering the biggest cost driver, fastest-growing expense, margin movement, and any expense line above 10% of revenue.
6. Export: buttons for "Download CSV" (table) and "Print/PDF" (window.print with a print stylesheet).
- Clean light theme: white cards, 8px radius, subtle shadow, Inter/system font.
- Colours: profit #16a34a, loss/negative #dc2626, primary #2563eb.
- Responsive. Cards stack on mobile at 375px, no horizontal scroll.
- Chart tooltips show values in full INR formatting.
- Every number in the dashboard traces back to the file or is a computation from it.
- KPI totals match the reconciled figures from Step 1.
- The file opens and works in a browser with no errors.
- No features beyond this spec.
RUNS ON
GPT-4GPT-4oClaude 3.5 Sonnet
How to use
Steps. Run it right.
Don't just paste and pray. Read how to get the best results from this prompt.
How to Use This Prompt (4 Steps)
Copy the prompt into ChatGPT.
Upload your P&L statement in PDF, Excel, CSV, or image format.
Run the prompt to analyze revenue, expenses, profit margins, and financial trends.
Download the HTML dashboard and open it in your browser to explore your financial performance.
Use cases
When to reach for this prompt.
◆easily track revenue
◆expenses
◆and profitability.
Pro tips
Things I'd add.
◇
Upload accurate P&L statements with clearly labeled periods.
◇
Include multiple months of data to unlock trend comparisons.
◇
Use detailed expense categories for better financial insights.
Common mistakes
Don't do these.
×Uploading incomplete financial statements.
×Using unclear or inconsistent expense labels.
×Expecting monthly comparisons from a single-period report.
×Ignoring reconciliation warnings and missing financial data.