---
title: Creating a Calculated/Derived Column
description: "Derived or calculated columns allow you to add new insights to your dataset by applying custom formulas or transformations using existing data columns. Click below for the instructions: [![](https://storieddata.com/wp-content/uploads/DerivedColumn-Add-column-and-Calculation-1024x543.png)](https://guutit.com/wp-content/uploads/SD-Manual/Creating-a-Derived-Column.html) [Open the instructions](https://guutit.com/wp-content/uploads/SD-Manual/Creating-a-Derived-Column.html)[.](https://storieddata.com/wp-content/uploads/SD-Manual/Using-Line-Chart-Basics.html) ### Writing Calculations: - Use **JavaScript syntax** and…"
url: "https://guutit.com/sd_manual/creating-a-calculated-derived-column/"
updated: "2026-08-19"
category: Data
---

# Creating a Calculated/Derived Column

Derived or calculated columns allow you to add new insights to your dataset by applying custom formulas or transformations using existing data columns.

Click below for the instructions:

[![](https://storieddata.com/wp-content/uploads/DerivedColumn-Add-column-and-Calculation-1024x543.png)](https://guutit.com/wp-content/uploads/SD-Manual/Creating-a-Derived-Column.html)

[Open the instructions](https://guutit.com/wp-content/uploads/SD-Manual/Creating-a-Derived-Column.html)[.](https://storieddata.com/wp-content/uploads/SD-Manual/Using-Line-Chart-Basics.html)

### Writing Calculations:

- Use **JavaScript syntax** and functions to write your calculations.
- To refer to a column in your data, use either of the following:
  - *`field.columnName`*
  - *`field['column name with space']`*

##### Example:

`field.Sales / field['Units Sold']`

This will calculate the **average price per unit**.

### Recalculate When Aggregating

This option determines how calculated columns behave when the data is aggregated in visualizations (e.g., in charts or pivot tables).

- **Unchecked (default)**: The calculation is done at the row level, and the aggregated result is based on those individual row values.
  For example, if you're calculating ***Sales / Units Sold*** per row, then the average of those row-wise values will be used in aggregated views.
- **Checked**: The calculation is applied *after* the aggregation, using the aggregated values.
  For example, the tool will first sum up the ***Sales*** and ***Units Sold***across all rows, then apply the formula:
  `Total Sales / Total Units Sold`.

**Use Case**:
Enable this when you want to ensure that your calculated field uses aggregated totals instead of row-level calculations in summaries.

---

### Useful References:

To expand your calculation capabilities, you can use:

- JavaScript **operators** (e.g., +, -, *, /, %, &&):
  [JS Operators](https://www.w3schools.com/jsref/jsref_operators.asp)
- JavaScript **Math functions** (e.g., Math.round(), Math.sqrt()):
  [JS Math Reference](https://www.w3schools.com/jsref/jsref_obj_math.asp)
- JavaScript **String functions** (e.g., toUpperCase(), replace(), substring()):
  [JS String Reference](https://www.w3schools.com/jsref/jsref_obj_string.asp)
