---
title: Previous/next value lookup
slug: analytics/docs/previous-next-value-lookup
docTags: 
createdAt: 2026-07-20T15:44:53.319Z
---

Use the previous value lookup block to retrieve the prior value of a time-ordered property, which can be an event stream or block, for an actor such as a user.

Configure the block with the following fields:

- **Previous/next** – Select **previous** or **next** to retrieve the value for the time-ordered property per actor.
- **Time series** – Choose a time-ordered block or an event stream property as an input.
- **Filter** – Apply a filter to narrow to a specific set of records before applying the previous/next selector. Use the following comparison operators (string comparisons are case-insensitive):
  - **is** – Checks if the left side equals the right side.
  - **is not** – Checks if the left side does not equal the right.
  - **contains** – Determines if the left side string contains the right side as a substring.
  - **in** – Verifies if the left side is present within the set of values on the right side.
  - **\<, >, >=, ...** – Applies mathematical operators.
- **Output-specific property** – Choose the particular property from the preceding or subsequent matching record that should be produced as output.
- **Only emit a value when there is a change** – Select this option to produce a non-null value only if the preceding or subsequent value differs from the current value for the same property.
- **For each** – Traverse through the elements in the dataset using this field to choose attributes and make the process more specific.

## Example

To retrieve the next value of the **user** **ID** property,

1. Select **next** in the **for** field.
2. Select the **Total Time Viewed(TTV)** metric as the time-ordered block in the **value in the time series** field.
3. Select **id** as the output specific property.
4. Select the **Users** dataset in the **for each** field.
5. Click **Run**.

![oa-pvl-block'.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/7nxb6tH3XkCGxgABKhcz7-20260720-144852.png)

## Output

The output of the previous/next value lookup block is the type of the previous value property.
