# CalculatedColumn

Canonical page: https://www.adaptabletools.com/docs/reference/calculatedcolumn

A column whose value is an AdapTableQL expression, stored in Adaptable State.

`ColumnId` is the id of the new column. `Expression` is required. `CalculatedColumnSettings.DataType` is required and is the type AdapTable uses for filters and expressions. `Type` is optional and is inferred from the expression: a per-row expression is `Standard`, an expression that reads change history is `Observable`, and an aggregation, cumulative, quantile or window expression is evaluated over rows.

```ts title="TypeScript"
export interface CalculatedColumn extends AdaptableObject 
```

###### Extends

[`AdaptableObject`](https://www.adaptabletools.com/docs/reference/adaptableobject.md)

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [CalculatedColumnSettings](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#calculatedcolumnsettings) | [`CalculatedColumnSettings`](https://www.adaptabletools.com/docs/reference/calculatedcolumnsettings.md) | Additional optional properties for Column (e.g. filterable, resizable) |
| [ColumnId](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#columnid) | `string` | Id of the column AdapTable creates. It is not the id of a column already in the data source. |
| [Expression](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#expression) | `string` | AdapTableQL Expression used to evaluate the Column&#39;s value.<br/><br/>The kind is inferred from the text: a per-row expression such as<br/>`[quantity] * [price]` yields a Standard column; an expression containing<br/>an aggregation such as `SUM{[notional], GROUP_BY([sector])}` or<br/>`[price] / AVG{[price]}` is evaluated over the row set. |
| [FriendlyName](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#friendlyname) | `string` | Name to be used in Column Header; if blank `ColumnId` is used |
| [Type](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#type) | [`CalculatedColumnType`](https://www.adaptabletools.com/docs/reference/calculatedcolumntype.md) | Calculated Column category: `Standard` / `Observable` (per-row) or<br/>`Aggregated` / `Cumulative` / `Quantile` / `Window` (over rows).<br/>See . |
| [IsReadOnly](https://www.adaptabletools.com/docs/reference/calculatedcolumn.md#isreadonly) | `boolean` | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;) |

## Property Details

### CalculatedColumnSettings

Additional optional properties for Column (e.g. filterable, resizable)

```ts title="TypeScript"
CalculatedColumnSettings: CalculatedColumnSettings;
```

###### Property Value

[`CalculatedColumnSettings`](https://www.adaptabletools.com/docs/reference/calculatedcolumnsettings.md)

### ColumnId

Id of the column AdapTable creates. It is not the id of a column already in the data source.

```ts title="TypeScript"
ColumnId: string;
```

###### Property Value

`string`

### Expression

AdapTableQL Expression used to evaluate the Column&#39;s value.

The kind is inferred from the text: a per-row expression such as
`[quantity] * [price]` yields a Standard column; an expression containing
an aggregation such as `SUM{[notional], GROUP_BY([sector])}` or
`[price] / AVG{[price]}` is evaluated over the row set.

```ts title="TypeScript"
Expression: string;
```

###### Property Value

`string`

### FriendlyName

Name to be used in Column Header; if blank `ColumnId` is used

```ts title="TypeScript"
FriendlyName?: string;
```

###### Property Value

`string`

### Type

Calculated Column category: `Standard` / `Observable` (per-row) or
`Aggregated` / `Cumulative` / `Quantile` / `Window` (over rows).
See .

```ts title="TypeScript"
Type?: CalculatedColumnType;
```

###### Property Value

[`CalculatedColumnType`](https://www.adaptabletools.com/docs/reference/calculatedcolumntype.md)

### IsReadOnly

> *Inherited from [AdaptableObject](https://www.adaptabletools.com/docs/reference/adaptableobject.md)*

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;)

```ts title="TypeScript"
IsReadOnly?: boolean;
```

###### Property Value

`boolean`
