Analyze a sales report like a data analyst, with AI
The five questions an analyst asks of a sales export, in order, with the prompts to use. A worked example where revenue is up 20.8% but margin is down, and the AI finds out why.
A sales export tells you a lot more than the total at the bottom. A data analyst works through it with the same few questions every time: how are we doing against last year, what's driving it, what's hurting it, who are we losing, and what should the manager hear. This post asks those questions of a real export in GPTExcel, with the exact prompts, so you can ask them of yours.
The data
sales_export_2025_2026.xlsx: 5,223 orders from 60 customers, January to September of 2025 and 2026. Each
row has a date, order ID, customer, region, product line, units, revenue and cost. That's a typical CRM or ERP
export, and it's all the analysis below needs.
Attach it to a chat. GPTExcel reads the file first and summarizes what's in it, so you can check it understood the columns before you ask anything.
1. How are we doing compared to last year?
How are we doing this year compared to last year?
Compare the same months of each year. Comparing nine months of this year with all twelve of last year is the most common mistake in a year-on-year number. GPTExcel works out the range in the data and compares January to September with January to September:
| Measure | 2025 | 2026 | Change |
|---|---|---|---|
| Revenue | $4,169,219 | $5,036,301 | +20.8% |
| Orders | 2,475 | 2,748 | +11.0% |
| Average order | $1,685 | $1,833 | +8.8% |
| Gross profit | $1,611,794 | $1,774,734 | +10.1% |
| Gross margin | 38.7% | 35.2% | −3.5 pts |
Revenue is up 20.8%, but gross profit grew only half as fast. Margin is the thread to pull.
2. What's driving the growth?
What's driving the growth?
GPTExcel splits revenue by product line and charts both years side by side. Almost all of the growth is one line:
- Smart Home: up 68.8%, from $1.23M to $2.07M. That's $843,285 of the $867,082 increase, or 97%.
- Tools: +6.0%
- Electrical: flat (+0.2%)
- Lighting: down 4.7%, the only line that shrank
A business that relies on one line for nearly all its growth is worth knowing about, and that line is the first place to look for the margin problem.
3. Why is our margin down?
Why is our margin down?
This is where a pivot table runs out and you need to look at unit economics. GPTExcel computes unit price and unit cost per product line, month by month, and finds the break:
- Smart Home's unit cost went up 18% in March, from $52.00 to $61.36, while its price stayed at $85.
- Its margin fell from 38.8% to 30.5%. Every other line kept exactly the same margin as last year.
Because Smart Home is now the biggest line, that one cost rise pulls the whole business down. It cost $171,793 in margin this year; at the old cost, overall margin would be 38.6%, the same as last year.
That's an answer someone can act on: renegotiate with the supplier, or raise the price.
4. Are any customers slipping away?
Are any customers slipping away?
A customer who stops ordering doesn't show up as a row; they show up as an absence. GPTExcel looks for customers whose last order this year was before July, and compares their spend with last year:
| Customer | Jan–Sep 2025 | Jan–Sep 2026 | Last order |
|---|---|---|---|
| Harbor Builders | $203,282 | $120,368 | 28 May 2026 |
| Delta Construction | $198,630 | $150,880 | 26 May 2026 |
Both are big accounts in the South, and together they've spent $130,664 less than last year. That's why the South grew only 12.3%, the slowest region (East +30.9%, West +25.2%, North +20.5%). Had they kept last year's pace, the South would be up about 21%, like the rest.
5. A summary for your manager
Write a one-page summary for my manager
The last step turns the findings into something a manager can read in a minute: the headline, what's working, the risks, and three next steps:
- Renegotiate the Smart Home supply price, or review its $85 price.
- Call both South accounts this week.
- Look into Lighting before Q4.
Export the answer to Word or PDF from the chat and send it as it is.
Checking the numbers
Every figure above comes from Python code GPTExcel runs on the file. Click any step in the answer to see the code and its output, so you can check exactly how a number was calculated before you put it in front of anyone.
Try it with your own export
Attach your sales export and start with "How are we doing this year compared to last year?", then follow the suggested questions under each answer. For the basics of asking questions about a file, see the AI Chat guide or watch your first AI data analysis. The same approach works for spending: see Budget vs actual analysis.