---
title: "Add a Group by transformation | Grafana Labs"
description: "Learn how to use the Group by transformation."
---

# Add a Group by transformation

The group by transformation allows you to group rows that share the same values in one or more fields. It’s similar to the `SQL GROUP by` clause. Use this when you need to aggregate data based on one or more fields, such as grouping by a specific category or region. Watch video -&gt;

To use the group by transformation, complete the following steps:

1. Open your dashboard in edit mode.
2. Click **Transformations** tab and click **+ Add transformation** button.
3. Select or search for **Group by**.
4. Select **Group by** on the dropdown of the field(s) that you want to group by.
5. To add various calculations on the other fields and apply the calculation to each group, select **Calculate** and a calculation type on the dropdown of the field(s) that you want to calculate.
6. The transformation should be applied automatically. If not, click **Refresh** to verify the visualization looks as intended.
   
   The following image shows a group by transformation that groups all similar `Region` together and calculates the total `Sales amount` per region.
7. Save your dashboard.
