AI Pivot Table in Google Sheets: Weekly Report in 2 Messages
Create a pivot table in Google Sheets with AI: tell the SheetMagic Chat Agent "revenue by region as a column chart" and it builds a native pivot and chart from your data. A 20-minute weekly report becomes two messages, on every plan including Free.
Phil Nguyen · 6 min read

To make a pivot table in Google Sheets with AI, open the SheetMagic AI Chat sidebar and type what you want, for example "make a pivot of total revenue by region". The Chat Agent builds a real Google Sheets pivot table from your data, and a second message such as "make a column chart of it" adds the chart, so a weekly report that takes 20 minutes of menu-clicking becomes two sentences.
Picture a shop owner who exports orders every Monday: date, region, product and revenue. Before the partner meeting they rebuild the same pivot by region, then insert a chart and fix its title, about 20 minutes each week, or close to 17 hours a year. With the Chat Agent, the same report is two messages, and the pivot and chart tools themselves cost nothing beyond the chat turn's AI tokens.
How do I make a pivot table with AI in Google Sheets?
- Open your sheet and click the tab that holds the data.
- Go to Extensions > SheetMagic > Open AI Chat.
- Describe the pivot in plain English.
For example:
Make a pivot table of total revenue by region from this sheet.
The agent reads your sheet, including its header row, and calls its pivot tool with three things: the source range (for example A1:D500), the column or columns to group rows by, and the values to summarise. Each value can be summarised by SUM, COUNT, AVERAGE, MIN, MAX or COUNTA, so "average order value by product" or "number of orders per region" work too. You can group by more than one column, for example "revenue by region and product".
If you do not name a destination, the pivot goes on a new tab called Pivot of followed by your data tab's name, for example "Pivot of Orders". You can also say where it should go: "put it on a tab called Weekly Report".
What you get is a native Google Sheets pivot table, so the usual pivot editor works on it afterwards.
Which charts can the agent build?
The agent can create bar, column, line, pie, scatter and area charts. Tell it the type and, if you want, a title:
Make a column chart of A1:B6 titled "Revenue by region, this week".
The chart is added to the tab you have open, from the range you name, and the first row is read as headers unless you say otherwise. To chart the pivot, open the "Pivot of" tab first and then ask for the chart, so the agent works on the pivot's cells.
Charts can be changed later in the same chat. The agent can update a chart's title, switch its type (say, column to pie) or move its legend to the top, bottom, left or right, or hide it. It can also delete a chart.
Will the agent change my sheet without asking?
Pivots and charts are added straight away, with no approval step. They do not overwrite your data: the pivot goes on its own tab and the chart sits on top of the sheet.
The agent stops and asks before a write would overwrite a block of cells that already hold data (by default, 10 or more filled cells). That check covers writing cells, autofilling and clearing contents. If you want a copy of the tab before trying something, say "duplicate this sheet as Orders backup first".
What can you do with the results?
- Answer the question in the meeting, not after it. "Which region sold the most this month?" is one message. Ask for a pivot by region or product while everyone is still in the room, instead of promising to send it later.
- Spot the slow seller before you reorder. Ask for revenue by product, then a column chart. A product that sells far less than the rest stands out before the next purchase order goes out, which is stock you do not pay for.
- Turn the weekly report into two messages. Paste the new export into the same tab and send the same two prompts. In the shop owner example, that is most of the 20 minutes back every Monday.
- Send the chart, not the raw data. The pivot lives on its own tab and the chart sums it up in a few bars, ready to copy into the partner update instead of walking anyone through 500 rows of orders.
What does it cost?
The pivot and chart tools have no cost of their own: no scraping credits and no extra charge. What you pay for is the chat turn itself, which uses AI tokens from your plan when it runs on SheetMagic's key. If you use your own API key (BYOK), the turn deducts nothing from your SheetMagic tokens.
The Chat Agent is on every plan, including Free. The Free plan includes 20,000 AI tokens and 100 scraping credits. The Solo plan is $20 a month and includes 3,250,000 AI tokens and 10,000 scraping credits a month.
What goes wrong?
- No header row. The agent groups and labels by your column headers. Add a header row (Date, Region, Product, Revenue) before you ask.
- Text in number columns. A revenue column with values like "$1,200 (est)" mixed in will not sum cleanly. Clean those cells first, or ask the agent to find and replace the stray text.
- The wrong tab. The pivot is built from the tab you have open and the chart is added to it. With several tabs, click the right one before you send the message.
- Totals in the chart. If the pivot ends in a Grand Total row, leave that row out of the chart range, or one bar will dwarf the rest.
- Very large sheets. The agent reads up to 25,000 cells of the open tab when you send a message. On bigger sheets it sees the first rows only, so name the full range in your message, for example "use A1:D20000".
For more ways to hand off sheet chores, see the AI Chat Agent guide and the AI in Google Sheets pillar. For analysis recipes with formulas, see the data analysis guide.
Text and scraping formulas run on the free allowance. Install from the Google Workspace Marketplace, no card, no expiry.
Install free for Google SheetsAbout the author
Phil NguyenPhil builds SheetMagic, the Google Sheets add-on that brings AI and web scraping into the spreadsheet, used by 6,000+ people. He writes these guides from the formulas he runs on his own sheets.
