---
title: "Create an Add field from calculation transformation | Grafana Labs"
description: "Learn how to use the Add field from calculation transformation."
---

# Create an Add field from calculation transformation

The add field from calculation transformation allows you to create a new column by performing a custom calculation on one or more existing fields in your data. Use this for when you need to create a new field, such as calculating the total, difference, percentage, or ratio. Watch video -&gt;

To use the add field from calculation 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 **Add field from calculation**.
4. Under **Mode**, select how you want your calculation to be applied.
5. Use the following table as a guideline for when to use the different modes.
   
   Expand table
   
   | Mode                 | When to use                                                                                        |
   |----------------------|----------------------------------------------------------------------------------------------------|
   | Binary               | When you want to apply basic binary operations on values in a single row from two selected fields. |
   | Unary                | When you want to apply basic unary operations on values in a single row from a selected field.     |
   | Reduce row           | When you want to apply selected calculation on each row of selected fields independently.          |
   | Row index            | When you want to insert a field with the row index.                                                |
   | Cumulative functions | When you want to apply functions on the current row and all preceding rows.                        |
   | Window functions     | When you want to apply window functions.                                                           |
6. For modes with the **Operation** or **Calculation** option, select the operation and calculation that you want to perform.
7. Add a new name to the new field by updating **Alias**.
8. The transformation should be applied automatically. If not, click **Refresh** to verify the visualization looks as intended.
   
   The following image shows an add field from calculation transformation with a binary operation. The transformation calculates the `Average Views per User` by dividing the `Page views` with `Unique users`.
9. Save your dashboard.
