---
title: Filter on numerical range
description: Filter rows or cells based on specified numerical thresholds.
category: Data Transformation,
tags: [range, filter, numeric, validation, flag]
---

# Filter on numerical range

## Description

The **Filter on Numerical Range** activity allows you to filter, flag, or clean data based on numeric thresholds. You can apply the configuration to one or more numeric columns and define how to handle values falling **within** or **outside** the given range.

> **Use Case**:  
> Useful when validating numeric inputs, preparing data for analytics, or removing anomalies by applying logical filters based on defined minimum and maximum values.

---

## Input

| Type | Description                           |
| ---- | ------------------------------------- |
| Data | Tabular dataset with numeric columns. |

---

## Output

| Type             | Description                                                  |
| ---------------- | ------------------------------------------------------------ |
| Transformed Data | Modified dataset based on the configured filtering behavior. |

---

## Configuration Fields

| Field Name                | Required    | Description                                                                                                                                                                                                                           |
| ------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Columns**               | Yes         | One or more columns to evaluate for range filtering.                                                                                                                                                                                  |
| **Minimum Value**         | Yes         | Lower boundary of the numeric range (inclusive).                                                                                                                                                                                      |
| **Maximum Value**         | Yes         | Upper boundary of the numeric range (inclusive).                                                                                                                                                                                      |
| **Actions**               | Yes         | What to do with values inside or outside the specified range: <ul><li>Keep Matching Rows</li><li>Remove Matching Rows</li><li>Flag Rows</li><li>Clear Content of Matching Cells</li><li>Clear Content of Non-Matching Cells</li></ul> |
| **FlagRows Action**       | Conditional | Rendered only if **Action** is _Flag Rows_. Specifies row matching logic:<ul><li>Flag if Any Column Matches</li><li>Flag if All Columns Match</li></ul>                                                                               |
| **Flag Rows Column Name** | Conditional | Name of the column used to indicate flag status. Required when **Flag Rows** action is selected.                                                                                                                                      |

---

## Sample Input

| column_1 | column_2 |
| -------- | -------- |
| 5        | data1    |
| 10       | data2    |
| 25       | data3    |
| 50       | data4    |
| 75       | data5    |

---

## Sample Configuration

| Field                 | Value                 |
| --------------------- | --------------------- |
| Columns               | `column_1`            |
| Minimum Value         | `10`                  |
| Maximum Value         | `50`                  |
| Action                | `Flag Rows`           |
| Flag Rows Action      | `Flag if Any Matches` |
| Flag Rows Column Name | `range_flag`          |

<!-- ![alt text](filter-on-numerical-range-img.png) -->

---

## Sample Output 1 (Action: Keep Matching Rows)

| column_1 | column_2 |
| -------- | -------- |
| 10       | data2    |
| 25       | data3    |
| 50       | data4    |

---

## Sample Output 2 (Action: Remove Matching Rows)

| column_1 | column_2 |
| -------- | -------- |
| 5        | data1    |
| 75       | data5    |

---

## Sample Output 3 (Action: Flag Rows – Flag if Any Column Matches)

| column_1 | column_2 | range_flag |
| -------- | -------- | ---------- |
| 5        | data1    | 0          |
| 10       | data2    | 1          |
| 25       | data3    | 1          |
| 50       | data4    | 1          |
| 75       | data5    | 0          |

---

## Sample Output 4 (Action: Clear Content of Matching Cells)

| column_1 | column_2 |
| -------- | -------- |
| 5        | data1    |
|          | data2    |
|          | data3    |
|          | data4    |
| 75       | data5    |

---

## Sample Output 5 (Action: Clear Content of Non-Matching Cells)

| column_1 | column_2 |
| -------- | -------- |
|          | data1    |
| 10       | data2    |
| 25       | data3    |
| 50       | data4    |
|          | data5    |

---

> Combine this activity with **Extract Numbers** or **Filter on Date Range** for multi-layered data validation.
