# AggregatedExpressionEvaluationValue

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

Materialized snapshot of an aggregated Expression, computed over the
target rows at call time. It does NOT update when data changes — re-evaluate
(or bind the expression to a Calculated Column / Alert) for reactive scenarios.

```ts title="TypeScript"
export interface AggregatedExpressionEvaluationValue 
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [getValueForRow](https://www.adaptabletools.com/docs/reference/aggregatedexpressionevaluationvalue.md#getvalueforrow) | `(row: IRowNode \| Record<string, unknown>) => unknown` | Per-row projection of the aggregation — the row&#39;s group value for<br/>`GROUP_BY` expressions, and the only meaningful output of per-row<br/>functions (`RANK`, `LAG`, `CUMULATIVE`, `PERCENTAGE`, …). Returns<br/>`undefined` when a `WHERE` clause excluded the row&#39;s group.<br/><br/>Accepts an `IRowNode` for grid-target evaluations, or a data-set row<br/>object when the call used `dataSet`. |
| [groupValues](https://www.adaptabletools.com/docs/reference/aggregatedexpressionevaluationvalue.md#groupvalues) | `\{ groupKeys: unknown[]; value: number; \}[]` | Per-group values when the expression uses `GROUP_BY` (absent otherwise).<br/>For multi-level `GROUP_BY`, entries include the intermediate group levels<br/>(`groupKeys.length`  number of group levels). Note: `Date` group values<br/>are keyed as timestamps (numbers). |
| [matches](https://www.adaptabletools.com/docs/reference/aggregatedexpressionevaluationvalue.md#matches) | `boolean` | Present when the Expression is a condition (e.g. `SUM([PnL]) > '5M'`).<br/>`true` when at least one aggregation group satisfies the condition. |
| [rowCount](https://www.adaptabletools.com/docs/reference/aggregatedexpressionevaluationvalue.md#rowcount) | `number` | Number of rows aggregated (after any `WHERE` filter). Lets callers detect<br/>partial data, e.g. under the server-side row model where only loaded rows<br/>are available client-side. |
| [value](https://www.adaptabletools.com/docs/reference/aggregatedexpressionevaluationvalue.md#value) | `number \| undefined` | The whole-set aggregation value. |

## Property Details

### getValueForRow

Per-row projection of the aggregation — the row&#39;s group value for
`GROUP_BY` expressions, and the only meaningful output of per-row
functions (`RANK`, `LAG`, `CUMULATIVE`, `PERCENTAGE`, …). Returns
`undefined` when a `WHERE` clause excluded the row&#39;s group.

Accepts an `IRowNode` for grid-target evaluations, or a data-set row
object when the call used `dataSet`.

```ts title="TypeScript"
getValueForRow: (row: IRowNode | Record<string, unknown>) => unknown;
```

###### Property Value

`(row: IRowNode | Record<string, unknown>) => unknown`

### groupValues

Per-group values when the expression uses `GROUP_BY` (absent otherwise).
For multi-level `GROUP_BY`, entries include the intermediate group levels
(`groupKeys.length`  number of group levels). Note: `Date` group values
are keyed as timestamps (numbers).

```ts title="TypeScript"
groupValues?: {
        groupKeys: unknown[];
        value: number;
    }[];
```

###### Property Value

`\{ groupKeys: unknown[]; value: number; \}[]`

### matches

Present when the Expression is a condition (e.g. `SUM([PnL]) > '5M'`).
`true` when at least one aggregation group satisfies the condition.

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

###### Property Value

`boolean`

### rowCount

Number of rows aggregated (after any `WHERE` filter). Lets callers detect
partial data, e.g. under the server-side row model where only loaded rows
are available client-side.

```ts title="TypeScript"
rowCount: number;
```

###### Property Value

`number`

### value

The whole-set aggregation value.

```ts title="TypeScript"
value: number | undefined;
```

###### Property Value

`number | undefined`
