> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/planning-sheets/how-tos/infobridge/data-transformations/group-by.md).

# Group by transformations

Learn how to aggregate and summarize detailed reports with the Group by transformation.

## Configure Group by transformations

Use Group by transformations to summarize data and calculate aggregated metrics such as totals, averages, minimum values, and maximum values. Group by transformations aggregate measures based on selected dimensions to create summarized datasets for analysis and reporting.

For example, Group by can calculate metrics such as average salary by region, total sales by quarter, or minimum experience by department.

### Sample data

The following sample data set is used for the examples in this article.

Sample employee table:

| Employee ID    | Department | Region        | Salary | Experience |
| -------------- | ---------- | ------------- | ------ | ---------- |
| Employee\_7916 | Operations | North America | 86907  | 12.4       |
| Employee\_9890 | Operations | North America | 88255  | 2.0        |
| Employee\_2263 | Sales      | North America | 37957  | 3.0        |
| Employee\_7835 | Marketing  | North America | 112324 | 10.5       |
| Employee\_5774 | HR         | North America | 105082 | 6.4        |
| Employee\_9297 | IT         | EMEA          | 65848  | 11.9       |
| Employee\_5061 | Operations | EMEA          | 62345  | 5.6        |
| Employee\_6237 | Operations | EMEA          | 91959  | 6.8        |
| Employee\_1004 | HR         | EMEA          | 57706  | 13.6       |
| Employee\_2950 | Finance    | APAC          | 114873 | 14.4       |
| Employee\_8722 | Marketing  | APAC          | 51200  | 9.2        |
| Employee\_8165 | Marketing  | APAC          | 113498 | 6.6        |
| Employee\_2388 | IT         | APAC          | 58881  | 14.0       |
| Employee\_6852 | Operations | APAC          | 64887  | 10.8       |
| Employee\_7678 | Operations | APAC          | 87371  | 2.5        |

Summary of aggregated data:

| Region        | Avg Salary | Headcount |
| ------------- | ---------- | --------- |
| North America | 86105      | 5         |
| EMEA          | 69464.5    | 4         |
| APAC          | 81785      | 6         |

### Open Group by

Open **Group by** from the **Transform** ribbon to configure aggregations and summarize data.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FFZsqEtIY51S9JWah1Yxk%2Fgroup-by-interface.png?alt=media&amp;token=41582490-88f1-4428-bbd6-a439826f3839" alt=""><figcaption></figcaption></figure>

### Configure Group by for a single measure

Use a single aggregation to summarize one measure by a selected dimension.

1. Open **Group by**.
2. Select **Quarter** from the **Category** dropdown menu.
3. Select **Minimum** from the **Operations** dropdown menu.
4. Select **InterestRate** from the **Values** dropdown menu.<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FujwrXcuQ4ZacXu9uj7Ta%2Fgroup-by-single-measure-configuration.png?alt=media&amp;token=a85323fc-ec80-45d3-8ae9-821cb1602cb9" alt=""><figcaption></figcaption></figure>
5. Select **Apply**.

The results display the minimum interest rate for each quarter.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FscmbZyFBHiigOQFVMwtj%2Fgroup-by-single-measure-results.png?alt=media&amp;token=2c3cd9d6-01a1-4ec3-96ba-f9b1589fd84d" alt=""><figcaption></figcaption></figure>

### Configure Group by for multiple measures

Use multiple aggregations to summarize more than one measure within the same transformation.

1. Open **Group by**.
2. Select **Quarter** from the **Category** dropdown menu.
3. Configure the first aggregation: **Minimum** for **InterestRate**
4. Select **Add Aggregation**.<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FsxhMWBpnMKt7RZZZfp0P%2Fgroup-by-multiple-measures-configuration.png?alt=media&amp;token=a776a601-bc58-4124-ac6a-91a375001507" alt=""><figcaption></figcaption></figure>
5. Configure the second aggregation: **Average** for **COGS**.
6. Select **Add Aggregation** again.<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F1lrTGzQ2mHWQ4m5KqK24%2Fgroup-by-multiple-measures-configuration-adding-second-measure.png?alt=media&amp;token=3ca2465e-9fce-4c1c-b859-3404722c97b6" alt=""><figcaption></figcaption></figure>
7. Configure the third aggregation: **Sum** for **Sales**<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FNR2kaypk47VrUfNTBc9A%2Fgroup-by-multiple-measures-configuration-added-third-measure.png?alt=media&amp;token=87cc0534-3dd0-46e4-b5f2-37f687f1fce8" alt=""><figcaption></figcaption></figure>

   \
   Select **Apply**.
8. The results display aggregated values for all configured measures.<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FQj3l3G8O1qraKX9EMVkx%2Fgroup-by-multiple-measures-results.png?alt=media&amp;token=a73782e9-fa17-43d2-8228-4bfb24f43412" alt=""><figcaption></figcaption></figure>

### Configure Group by for multiple dimensions

Use multiple dimensions to create more detailed aggregations.

1. Open **Group by**.
2. Select multiple dimensions from the **Category** dropdown menu. For example,
   * **Country**
   * **Quarter**
3. Configure the first aggregation. For example:

   * **Maximum** for **InterestRate**

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FlI4tFWwCxjxfMCmE25mV%2Fgroup-by-multiple-dimensions-configuration.png?alt=media&amp;token=e975e5b5-7154-4a91-b068-7e6de07ed360" alt=""><figcaption></figcaption></figure>
4. Configure other aggregations. For example:

   * **Sum** for **Sales**
   * **Average** for **COGS**<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FE1wQOqVdrvoG3Z1WLqz6%2Fgroup-by-multiple-dimensions-configuration-added-additional-operations.png?alt=media&amp;token=5c02333b-4027-4110-aff4-5821633da868" alt=""><figcaption></figcaption></figure>
5. Select **Apply**.<br>

   <figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FuzM7hJQxiPZjWeFeuhKN%2Fgroup-by-multiple-dimensions-results.png?alt=media&amp;token=8f4be6c9-71d4-466a-9a8d-6e72a3479feb" alt=""><figcaption></figcaption></figure>

   \
   The results display aggregated measures for each dimension combination.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/how-tos/infobridge/data-transformations/group-by.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
