Find where discounts eat your margin with Gemini
The struggle: Sales gives discounts to close deals, and by year end your margin is below plan with nobody able to say where it went.
What you end up with: A one-page summary of list versus invoiced price by product, deal size and month, with the biggest leaks named.
Gemini in Sheets compares list price with invoiced price, tags the free-text discount reasons and builds a pivot and a chart. You see which products, deal sizes and months lose the most margin, then decide the policy yourself.
Tools: Gemini. Level: Pro. Time: 45 min once, then 15 min a month.
Use it if
- Your invoice export has a list price and an invoiced price per line
- Discounts are approved case by case and nobody sums them
- You want to know where to tighten the rules
Skip it if
- You want to rate or rank individual salespeople
- Your data has no list price, so there is nothing to compare
What you need first
- Gemini in Sheets (an eligible Google Workspace or Google AI plan, such as Google AI Pro)
- An invoice or deal export in a Google Sheet with columns for product, customer segment, date, list price, invoiced price and discount reason; remove salesperson names
The method
Prepare a safe copy (Gemini: Google Sheets)
Make a copy of the sheet and delete any column with salesperson names or customer contact details. Keep one row per invoice line. If the file is .xlsx, use File, then Save as Google Sheets first. Click Ask Gemini at the top right and check that the headings read clearly.
You get: A clean copy with one table, one heading per column and no people columns.
Tip: Aggregate by product, deal size and month only; a leak is a pattern in the deals, not a verdict on a person.
Tag the free-text discount reasons (Gemini: AI function)
In a new column enter the AI function with a prompt that lists your categories and points at the reason cell, then choose Generate and Insert. Work in batches of 350 cells or fewer, because Google generates only the first 350 selected cells at once. Generated results cannot be undone or redone, so work on your copy and regenerate to change an answer. Spot-check 20 rows.
Prompt to copy:
=AI("Classify this discount reason into exactly one of: competitor price, volume, end of quarter, goodwill, payment terms, unclear. Reply with the category only. If the cell is empty reply unclear.", [reason cell])
You get: A reason category on every discounted line, such as competitor price, volume, late payment or goodwill.
Tip: Add an Other category and read those rows; they show reasons you forgot.
Build the leak summary (Gemini: Ask Gemini)
Add two columns: discount amount (list minus invoiced) and discount percent. In Ask Gemini ask for a pivot of discount amount by product and month, then by deal size band. Review the preview card and click Apply for each. Ask for one chart per pivot and click Insert.
Prompt to copy:
Create a pivot table with product as rows and month as columns showing the sum of discount amount. Then a second pivot with deal size band as rows and the sum of discount amount and the average discount percent as values. Tell me if any column is missing or blank instead of guessing.
You get: Pivots and charts showing where list price turns into a lower invoiced price.
Tip: Ask for total discount in money as well as percent; a small percent on a huge product can be your biggest leak.
Check the numbers yourself (Gemini: Google Sheets)
Pick one product and one month. Recompute its discount total with a plain SUMIFS on the source rows and compare it with the pivot. If they differ, ask Gemini why and fix the source or the pivot filter before sharing anything.
You get: Figures you have checked by hand against the raw data.
Tip: Ask finance for last month's reported margin and make sure your totals reconcile to it.
Write the finding in plain words (Gemini: Ask Gemini)
Ask Gemini for five plain sentences: the three biggest leaks, one surprise, and two questions the numbers cannot answer. Send them to the sales lead as questions about the pattern, not as findings about anyone.
Prompt to copy:
From the pivots in this sheet write five plain sentences for a sales lead: the three biggest discount leaks by product, deal size and month, one surprising pattern, and two questions this data cannot answer. Name no individuals. Quote the numbers you used.
You get: A short note you can take to the next pricing meeting.
Tip: End with a question for sales, such as what is behind the biggest end-of-quarter cluster.
Where this goes wrong
- Gemini can build a pivot that groups or filters differently from what you meant. Always read the filter on the pivot.
- Charts made from generated data do not update when the source data changes, so rebuild them for a new month.
- The AI function returns text labels that are model guesses; read a sample of every category and never use the labels as proof of a motive.
- Keep the analysis to products, customers and deals. Have a qualified person check this before you sign, file or send it. Use this before any figure goes to a board, investor or auditor.
Sources
More like this
- Sort a year of bank lines into categories
- A polite late payment email ladder
- Your spreadsheets, explained and charted
Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.