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

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

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

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

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

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 CompiledFormula {
    readonly formula: string;
    readonly references: readonly PivotFormulaReference[];
    evaluate(get: (aggregate: PivotAggregate, field: string) => number | null): number | null;
}
```

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `formula` | `readonly formula: string;` |  |  |
| `references` | `readonly references: readonly PivotFormulaReference[];` |  | Measures the formula reads, deduplicated, in order of appearance. |
| `evaluate` | `evaluate(get: (aggregate: PivotAggregate, field: string) => number \| null): number \| null;` |  |  |
