> ## Documentation Index
> Fetch the complete documentation index at: https://offthepace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# trailing_observation_count

> How many valid observations the matching trailing_median() actually saw.

How many valid observations the matching trailing\_median() actually saw. Ship it beside every trailing\_median in a model that feeds the ML contract: it is what makes that median's NULLs and its early-window instability visible to a consumer instead of silent.

## Signature

```sql theme={null}
{{ trailing_observation_count(value_col, partition_by, order_by, lookback=none, frame='rows', valid_condition=none) }}
```

## Returns

scalar expression composable in a SELECT list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.