---
title: Cohorts
slug: analytics/docs/cohorts
docTags: 
createdAt: 2026-07-20T15:45:12.674Z
---

In Optimizely Analytics, a cohort is a specific group within a dataset, defined by a condition that determines which records are included. In the catalog, a cohort is a Boolean property connected to the dataset. Only records with this property marked as True are considered part of the cohort.

For example, consider a *Users* dataset with one record per user and a *Page* views dataset with records of each user's page view events. You can use cohorts to select users with 10 or more page views in the last week.

A cohort can involve complex computations if the outcome applies to each record in the target dataset, such as joins with other datasets, filters, and aggregations.

You can use a cohort wherever the catalog is available or in the segments section of any exploration template. It functions like any other dataset column; its configuration is stored in analytics and accessed through the catalog.

A cohort has the following configuration:

- **Dataset** – Associate your cohort with one dataset when defining the cohort. Your cohort displays in the catalog just like any other column of that dataset and can be used in any analysis with access to the catalog. You cannot move a cohort from one dataset to another.
- **Name** – Ensure the name of your cohort is unique across all columns for that dataset.
- **Definition** – Specify the computation for your cohort using the Block Editor.

## Create a cohort[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#creating-a-new-cohort)

### Create a saved cohort[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#creating-a-new-saved-cohort)

1. Click **+** and select **Cohort**.
2. Select one of the following template options:
   - **Behavioral** – Determine a cohort of actors based on their attributes or behaviors.
   - **Formula** – Calculate a cohort of values based on arithmetic and logical operators.
   - **Conditional on property** – Create a cohort using **and/or** logic based on dataset properties.
   - **Custom** – Calculate a cohort of values by composing several blocks.
   - **Conditional on Aggregate** – Calculate an aggregated quantity per actor to decide inclusion in the cohort.
   - **Conditional on intervals engaged** – Calculate how many distinct time intervals each actor engaged in some behavior.
3. Enter a name and description.
4. Select a dataset in the **Cohort of** field.
5. Define the computation for your cohort in the block editor.
6. Click **Run** to preview the computed values.
7. Click **Save**.

You can now use the cohort anywhere, such as inside exploration templates, the block editor, and so on. You can access it in any Exploration templates under the **Segment by Cohort** section.

![oa-cohort-1.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/cioeA7fwArXguQPRtpGE1-20260720-144955.png)

### Define an inline cohort[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#defining-an-inline-cohrt)

1. Go to the **Segment by Cohort** section inside an Exploration template. [Learn more about Explorations](docId\:u2tlXpjocdzP6-_-Odi10).
2. Select **+ >** **New cohort**.
3. Set the condition for your cohort and click **Apply**. You can also define additional blocks to complete the definition.
4. Click **Run** to see segmented results.

![oa-cohort-2.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/EofOR-rOFSs0z59faUgKZ-20260720-144955.png)

## Audience[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#audience)

An audience is a cohort that is published to the warehouse. There are two types of audiences:

1. **Table** – Publish the current audience members snapshot as a physical table.
2. **View** – Publish audience definition as a logical view with audience members live.

### Publish cohorts to the warehouse[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#publishing-cohorts-to-the-warehouse)

1. Create a cohort or choose an existing one.
2. Click **More (⋮) > Publish Audience**.

   ![oa-cohort-3.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/fKD_witrkkrYRF_cTQHDD-20260720-144955.png)
3. Enter the following details:
   - **Audience Name** – Enter the cohort's name published in the warehouse.
   - **Audience Description** – Describe the cohort published in the warehouse.
   - **Type** – Select whether the cohort is saved as a View or Table in the warehouse, depending on the Table or View option.
   - **Sync** – Configure the cron job that updates the table periodically. The audience membership can be refreshed periodically when published as a table or a view.
4. Click **Save**. You can see published audiences under the **Audiences** tab inside the **Cohorts** section.

   ![oa-cohort-4.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/bXTiACUm5pPPD4O7feDUP-20260720-144955.png)

After saving, you have options like **Run now** and **Pause/Resume sync**.

![oa-cohort-5.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/AS_bzRn5Lj4Hk-saZuM4--20260720-144955.png)

To see other options available for audiences, click **More (⋮)** corresponding to each published cohort. The following options are displayed:

- **Edit** – Update the schedule for previously scheduled audience updates (relevant only for tables, not views).
- **Refresh** – Re-populate the audience based on the updated definition of the cohort or data (relevant only for tables and not for views).
- **Delete** – Delete the table or view in the data warehouse.

![oa-cohort-6.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/pAvtNg8l69nzBCsuvvj6U-20260720-144955.png)

:::hint{type="info"}
**Note**

Remember to configure details about your warehouse database and schema where the data needs to be published. [Learn more about Application settings](https://app.netspring.io/documentation/docs/Administration/application_and_user_settings).
:::

## Types of cohorts[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#types-of-cohorts)

Analytics offers a range of cohort templates that let you get started. Choosing a template is the first step in creating a cohort. You can change this at any time without losing any work.

### Behavioral[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#behavioral)

Create a cohort of actors based on their attributes or behavior. This template lets you create cohorts tailored to user behavior specific to your business rather than general user behavior.

1. Go to **+ > Cohorts > Behavioral**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Users** dataset.
3. Enter a name and description.
4. Set the condition in the **Blocks** section. Choose **did** from the drop-down list, select the event, such as **Make Purchase** from **Product** **Events**, and click **Apply**.
5. Set the time range. For example, choose **Within 7 days after timestamp** and select the **Sign Up Date** derived column.
6. Add an aggregate filter and set the count to **>= 1**.
7. Click **Apply** and select **Run**.
8. Click **Save**.

![oa-cohort-7.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/bA_yoMjZfREMCfCk_IvX6-20260720-144955.png)

### Formula[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#formula)

Create a cohort of values based on arithmetic and logical operators. For example, you can create a cohort of users using the *.com* domain.

1. Go to **+ > Cohorts > Formula**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Users** dataset.
3. Enter a name and description.
4. Enter the formula in the **Blocks** section:

```auto
 regexp_substr(Data.Users.id, '[^\\ .] $') == 'com'
```

5. Click **Run**.
6. Click **Save**.

![oa-cohort-8.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/MaKIAC4Q495aoLoox9nXs-20260720-144955.png)

### Conditional on property[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#conditional-on-property)

Create a cohort using and/or logic based on dataset properties. As an example, you can create a cohort of *Active users*.

1. Go to **+ > Cohorts > Conditional on property**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Users** dataset.
3. Enter a name and description.
4. Choose the **Purchased in Last 30 Days** cohort in the **And/Or** block and set the value to **True**.
5. Choose the **Viewed Similar Content - L30D** cohort and set the value to **True**.
6. Click **+ > Add a Condition**, choose the **Total Time Viewed** metric, and set the value to **>** **500**.
7. Click **Run**.
8. Click **Save**.

![oa-cohort-9.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/-1J-2R4Hg30ghpdRN3hXa-20260720-144955.png)

### Custom[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#custom)

Calculate a cohort of values by composing several blocks. For example, you can create a cohort for *Regular Subscriptions*. A regular subscription is one for which at least half its users are regular watchers. A regular watcher is a user who has played content on at least five distinct days in the last 30 days.

1. Go to **+ > Cohorts > Custom**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Subscriptions** dataset.
3. Enter a name and description.
4. Add a new **Aggregate** block in the **Blocks** section. Set the aggregator to **count** and choose the **Users** dataset. You can call this the *Overall Users* block.
5. Add another **Aggregate** block to calculate the number of *Regular Users*.
6. Set the aggregator to **count** and choose the **Regular Watchers** cohort. [See how the Regular Watchers cohort is created](docId\:qqERbaNW3LL9kPlSp27Lr).
7. Add a **Formula** block to calculate regular subscriptions. Enter the following formula:

```auto
"Regular Users" / "Overall Users" >= 0.5.
```

8. Click **Run**.
9. Click **Save**.

![oa-cohort-10.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/iWjxFELUxgm8lnlrqwC9N-20260720-144955.png)

### Conditional on aggregate[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#conditional-on-aggregate)

Calculate an aggregated quantity per actor to decide on inclusion in the cohort. For example, you can create a cohort of *Heavily Marketed Users in the USA*.

1. Go to **+ > Cohorts > Conditional on Aggregate**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Users** dataset.
3. Enter a name and description.
4. Set the condition in the **And/Or** section as follows: **country** in **USA, CAN, AUS**. Name this block **Heavily Marketed Users**.
5. Go to the **Aggregate** block. Choose the **count** aggregator and select **Heavily Marketed Users** as the value.
6. Click **Run**.
7. Click **Save**.

![oa-cohort-11.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/j5zWu-AbvwRV9eQk4Ywxi-20260720-144956.png)

### Conditional on intervals engaged[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#conditional-on-intervals-engaged)

Calculate the number of distinct time intervals each actor engaged in some behavior. As an example, create a cohort of *Regular Watchers*. Here, a regular watcher is a user who has played content on at least five distinct days in the last 30 days.

1. Go to **+ > Cohorts > Conditional on intervals engaged**.
2. Select a dataset in the **Cohort of** field. For example, choose the **Users** dataset.
3. Enter a name and description.
4. Choose **count of distinct days** from the drop-down list and select the **Users** dataset in the **when** field in the **Intervals Engaged** block.
5. Set the condition as **did** **Play Content**. Add a filter with the following configuration: when users plated content **at least** *1* time and **at most** *10* times. You can call this the **Days Played** block.
6. Set the condition to **Days Played >= 5** in the **And/Or** block.
7. Click **Run**.
8. Click **Save**.

![oa-cohort-12.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/PfFMISsqjc0igrFPB2fi6-20260720-144956.png)

## View cohorts[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#viewing-cohorts)

### Cohorts section[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#cohorts-section)

1. Click the **Home** icon.
2. Select the **Cohorts** checkbox. The resulting page displays a set of templates at the top for defining cohorts.
3. Use the search bar to find individual cohorts by name.

You can find a paginated listing of cohorts in the system, pooled across the datasets. Each cohort entry contains the following information:

- Name (with Description, if any)
- Created By
- Updated By
- Updated At
- Type (refers to the template used when defining the cohort)

![oa-cohort-13.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/uTiMRTGnD6QBglU5Aq1c2-20260720-144956.png)

### Dataset page[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/cohorts#dataset-page)

Alternatively, click **Cohorts** inside the dataset page to access the cohorts for a given dataset.

![oa-cohort-14.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/BTlWiTpfg9zOazEAFNdMj-20260720-144956.png)

## Edit cohorts

1. Click **Home**.
2. Select the **Cohorts** checkbox.
3. Identify the cohort you want to edit and click the **Name**.

Alternatively, click **Cohorts** inside the dataset page to access the cohorts for a given dataset and click the **Name**.

## Delete cohorts[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/other_actions_mbs#deleting-a-cohort)[​](https://app.netspring.io/documentation/docs/Model%20Behavioral%20Semantics/other_actions_mbs#from-the-cohorts-page-1)

1. Click **Home**.
2. Select the **Cohorts** checkbox.
3. Identify the cohort you want to delete and click **More (⋮) > Delete**.
4. Click **Yes** to confirm.

Alternatively, click the **Name** to open the cohort and click **More (⋮) > Delete**.

You can also go to **Data > Datasets** and click the **Name** to open the dataset. Click **Cohorts > More (⋮) > Delete**.

##
