---
title: In & Not In
slug: segment/in-and-not-in
docTags: 
createdAt: 2026-01-15T00:58:41.498Z
---

:::hint{type="info"}
These filter types are available for *Text, Number, Decimal, EmailAddress, Phone,&#x20;*&#x61;nd *Locale&#x20;*&#x66;ield types.
:::

## *In* filter type

The *In* filter type allows you to select records that contain specific values within a defined attribute or field. It’s ideal when you want to target customers who belong to one or more groups, or have specific values assigned to them.

### How it works

The filter will match any record where the attribute matches one of the values you’ve defined. You can specify a list of values to include in the filter, making it more flexible and accurate.

### Example

Let’s say you are working with a segment of customers in a loyalty program, and you want to target customers who belong to specific cities or regions. You can use the *In* filter to include all customers from the cities you are targeting.

![](https://support.deselect.com/hc/article_attachments/33878676060433)

## *Not In* filter type

The *Not In* filter type is the opposite of the *In* filter. It allows you to exclude records with specific values from the segment. This is useful when you want to target everyone except customers who belong to certain groups, have specific attributes, or fall into particular categories.

### How it works

- The filter will exclude any record that contains one of the specified values.
- It’s useful for narrowing down your audience by excluding unwanted groups or attributes.

### Example

Imagine you want to send a promotional email to customers, but you need to exclude those who have already opted out and pause of email communications. You can use the *Not In* filter to exclude customers who have opted out.

![](https://support.deselect.com/hc/article_attachments/33878985874577)

## Work with *numbers* & *decimal&#x20;*&#x66;ield types

*In* and *Not In* filter types can be used to match for a field that is either equal or not equal to one of the given values ensuring that the values are separated with a comma. Note that signed integers (+ and -) are recognized and can be used as values when using In/Not In filter types.

To type in multiple Number and Decimal values, ensure to separate each value with a comma. Upon doing so, each number value will be tagged as a single value and will be automatically sorted ascendingly.

For high number values (e.g. 1,800 or 1.800) neither comma nor dot should be included for the number value (e.g. 1800).

## Work with empty values

The *In&#x20;*&#x61;nd *Not In* filters always exclude all the empty (null) values. This configuration, inherited from the standard SQL practice, determines that, when comparing an empty value to any other value, it is neither equal nor different, but indeterminate. Therefore, empty values are excluded, because it's never going to be "equal" or "distinct" restrictively to the values provided.

### Example

Take this table:

| **Id** | **First Name** | **Country**      |
| ------ | -------------- | ---------------- |
| 1      | Mathiew        | Belgium          |
| 2      | Tom            | France           |
| 3      | Eduardo        | Spain            |
| 4      | Sameer         | \<empty or null> |

If you create a Selection and apply the following filter:

::Image[]{src="https://support.deselect.com/hc/article_attachments/10691957322641" size="80" width="2206" height="396" isUploading="false" darkWidth="2206" darkHeight="396" showCaption="false"}

The outcome will be:

| **Id** | **First Name** | **Country** |
| ------ | -------------- | ----------- |
| 3      | Eduardo        | Spain       |

As you can see, Id 4 will be excluded, because it's empty.&#x20;

If we want to keep empty values as well as values distinct to Belgium and France, you will need to add another filter that explicitly includes empty values:

![](https://support.deselect.com/hc/article_attachments/10838716951185)

In this case, the outcome will be:

| **Id** | **First Name** | **Country**      |
| ------ | -------------- | ---------------- |
| 3      | Eduardo        | Spain            |
| 4      | Sameer         | \<empty or null> |

