# PivotCalculatedField (@salmonui/pivot-table/engine)

> The PivotCalculatedField interface of @salmonui/pivot-table/engine.

Canonical: https://salmonui.dev/docs/reference/pivot-table/engine/PivotCalculatedField

```ts
import type { PivotCalculatedField } from '@salmonui/pivot-table/engine';
```

Also exported from `@salmonui/pivot-table`.

Entry index: https://salmonui.dev/docs/reference/pivot-table/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/pivot-table/engine.md).

## Reference

Kind: interface

```ts
interface PivotCalculatedField {
    readonly name: string;
    readonly caption?: string;
    readonly formula: string;
    readonly format?: PivotFormat;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `name` | `readonly name: string;` |  | Measure name used by `values[].field`, value sort and value filters. |
| `caption` | `readonly caption?: string;` | optional |  |
| `formula` | `readonly formula: string;` |  | Formula over aggregated measures: `"Sum(Amount)" / "Count(Units)"`, `IF(...)`, ... |
| `format` | `readonly format?: PivotFormat;` | optional |  |
