# PivotValueField

> _Since v0.1.1_

Defines a value field in the pivot table — which data field to aggregate
and how to compute the aggregation.

Multiple `PivotValueField` entries on the same `field` with different `aggFunc`
values create separate columns (e.g. "Revenue (Sum)" and "Revenue (Avg)").

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `field` | <code>string</code> | The row data field to aggregate (must exist on the source row objects). |
| `aggFunc` | <code><a href="/grid/plugins/pivot/types/aggfunc/">AggFunc</a></code> | Aggregation function — a built-in name or a custom function. |
| `header?` | <code>string</code> | Custom column header label. Defaults to `"field (aggFunc)"` if omitted. |
| `format?` | <code>(value: number) =&gt; string</code> | Format function for display values. Receives the aggregated number and returns a string. When omitted, the original column's `format` is used if available, otherwise raw `String(value)`. |

### Property Details

#### format

```typescript
{ field: 'revenue', aggFunc: 'sum', format: (v) => `$${v.toLocaleString()}` }
```

---
