Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. What users can ask
  2. How a pivot is written
  3. What the grid needs
  4. What is declined
  5. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

Pivoting

On this page

  1. What users can ask
  2. How a pivot is written
  3. What the grid needs
  4. What is declined
  5. Next

Your users ask for one category down the side and another across the top, and the grid turns into a pivot table, with one or more measures in its cells.

What users can ask#

Ask

Pivot total revenue with country as rows and category as columns.

Changes3 changes
  1. 1pivot rows: country
  2. 2pivot columns: category, ascending
  3. 3pivot values: revenue sum
Ask

Revenue by category across years

Changes3 changes
  1. 1pivot rows: category
  2. 2pivot columns: orderDate-year, ascending
  3. 3pivot values: revenue sum

A filter and two levels across the top in one question:

Ask

Only orders in DE on or after April 1, 2025 and before October 1, 2025. Pivot total revenue with category as rows and order date year then order date quarter as columns, both descending.

Changes6 changes
  1. 1filter country equals DE
  2. 2filter orderDate on or after 2025-04-01
  3. 3filter orderDate before 2025-10-01
  4. 4pivot rows: category
  5. 5pivot columns: orderDate-year, orderDate-quarter, descending
  6. 6pivot values: revenue sum

"Revenue by category", with a single category, is grouping, not a pivot: see Grouping.

How a pivot is written#

  • rows are the fields down the side, columns the fields across the top, each with a direction, and values the measures, each with one function from Aggregation.
  • A pivot replaces grouping and totals: the answer has none while the pivot is on.
  • The year and quarter columns MUI derives from a date (orderDate-year, orderDate-quarter) are only for pivot rows and columns. To filter by a year, the answer puts a range on the date itself.
  • "Leave pivot mode" or "start over" turns the pivot off.

What the grid needs#

SettingWhereWith MUI's stock resolverWith the Gridsay helper
disablePivotingWhereGrid propWith MUI's stock resolverThe derived year and quarter columns are not sent, and the grid applies a pivot answer as grouping.With the Gridsay helperSent. A question that needs a pivot is declined.
pivotable: falseWhereColumnWith MUI's stock resolverNot sent. The grid pivots by that column anyway.With the Gridsay helperSent. Pivoting by that column is declined.
getPivotDerivedColumnsWhereGrid propWith MUI's stock resolverReplaces the derived date columns; Gridsay uses the ones you define.With the Gridsay helperThe same.
Leaving pivot modeWhereGridWith MUI's stock resolverThe grouping and totals from before the pivot can come back over the answer.With the Gridsay helperThe new answer is what stays. The pre-pivot view shows for a moment first.

What is declined#

A measure appears once in a pivot. Two functions on the same column are declined:

Ask

Pivot country as rows and category as columns. Show BOTH sum of revenue and average revenue as separate measures.

ChangesNo change
Refused

Revenue can be summed or averaged here, not both; pick one.

Your user reads this sentence. The table stays as it was.

With the helper and pivotable: false on the customer column:

Ask

Pivot total revenue with customer as rows and category as columns.

ChangesNo change
Refused

Customer cannot be used as pivot rows.

Your user reads this sentence. The table stays as it was.

If an answer still pivots after one correction, the sentence is "Pivoting is switched off for this table." or, naming the column, The `customer` column can't be used in a pivot.

Next#

  • Charts
  • Aggregation
  • Follow-up questions