> For the complete documentation index, see [llms.txt](https://docs.gridmate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridmate.io/advanced-guides/other-components/pivot-grid-advanced-settings.md).

# Pivot Grid - Advanced Settings

Add custom actions, a second X column and formulas to Pivot Grids for deeper analysis.

## Custom Action

We’ve introduced **custom action support for Pivot Grids**, allowing administrators to configure both **global actions** and **mass actions** directly within pivot views.

This enables users to trigger Salesforce **Flows** or **custom actions** without leaving the grid.

#### Flow – Apply Discount %

Below is an example of the **Apply Discount %** Screen Flow used in this demo.

The Flow includes:

* A **Discount Screen**, where the user enters the discount percentage
* An **Update Records** step, which applies the discount to the selected records

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fetm8J5ZI1UvMjZmI7W6a%2FScreenshot%202026-02-12%20at%2015.33.09.png?alt=media&amp;token=75b75017-4acd-477e-aba6-42619f5c4233" alt=""><figcaption></figcaption></figure>

#### Action Configuration

Below is a sample configuration used in this demo:

```json
[
    {
        "label": "Apply Discount %",
        "name": "Apply_Discount",
        "component": "gmpkg:DataGridCallFlowComponent",
        "attributes": {
            "flowName": "Apply_Discount",
            "idListParam": "idList",
            "autolaunched": false
        }
    }
]
```

Below is a step-by-step tutorial on how to configure these actions 👇

{% embed url="<https://youtu.be/cAH5qQ8l1t0>" %}

## Second X Column

We’ve introduced support for **secondary X-axis columns** in Pivot Grids, enabling more advanced multi-dimensional analysis through hierarchical grouping.

In this advanced guide, we’ll cover:

* Configuring **two X-axis columns** to enable multi-level grouping
* Using **intermediate aggregations** to display summaries between grouped levels
* Hiding the **Grand Total** to control overall aggregation visibility
* Enabling **X-axis header groups** to improve structural clarity

Below is a step-by-step tutorial demonstrating how to configure these options 👇

{% embed url="<https://youtu.be/v6qONTUVvFM>" %}

## **Formulas**

Ever wished your grid could do the math for you? With Pivot Grid Formulas, it can. Whether you're tracking margins, calculating totals, or applying logic on the fly you define the expression, GridMate delivers the result, right inside your grid. No code, no complex configurations, just pure flexibility at your fingertips.

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Pivot Grid</strong></td><td>Summarize and edit time series records as a pivot table.</td><td><a href="https://docs.gridmate.io/product-tour/grids/pivot-grid-in-action.md">Pivot Grid</a></td></tr><tr><td><strong>GM - FieldSet Pivot</strong></td><td>Every property of the component.</td><td><a href="https://docs.gridmate.io/package-reference/components-library/kanban-and-pivot/gm-fieldset-pivot.md">GM - FieldSet Pivot</a></td></tr><tr><td><strong>Grid - Mass/Record Actions</strong></td><td>Configure toolbar, global and record actions, from filters to flows.</td><td><a href="https://docs.gridmate.io/advanced-guides/grid-actions/actions-library.md">Grid - Mass/Record Actions</a></td></tr></tbody></table>

## Pivot Grid Formulas Demo

Below is a step-by-step tutorial on how to configure Pivot Grid Formulas 👇

{% embed url="<https://youtu.be/89y3mwxj0wA>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gridmate.io/advanced-guides/other-components/pivot-grid-advanced-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
