---
title: BINNING
description: Discover how to use the BINNING function to categorize data into discrete bins. Simplify conditional logic with defining ranges and names.
---
import {  Steps } from '@astrojs/starlight/components';

# BINNING

The BINNING in Infoveave categorizes data into discrete categories or “bins”.

## Applicable to

Calculated Columns

## Return Value

BINNING returns the specified value if the condition is true.

## Remark

BINNING can be used as a more concise alternative to IF statements for simple conditional logic.

![Binning](/images/Binning.png)
<Steps>
1. Select the data type option as BINNING.
2. With BINNING selected as the data type, select the column required from the drop option to be put into bins/categories.
3. Under the formula section, enter the lower and upper ranges of the values along with the bin name.
4. Enter the bin name for the out of ranges values.
5. To add more conditions, click on the **Add Rule +** option associated with the operation.
6. Click on the **execute** button to run the analysis.
</Steps>
![Binning operation](/images/Binning-operation.png)

***Example 1***

**Objective** Consider you want to create an age bucket on the below table.

| ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY |
|---|---|---|---|---|---|
| 2024-01-03 | Brazil | Baby Food | 38.41 | 43.7874 | 2 |
| 2024-01-07 | Japan | Spices | 45.56 | 50.8155 | 20 |
|  | Japan |  |  | 43.7874 | 10 |
| 2024-01-18 |  |  |  | 32.3019 | 4 |
| 2024-01-22 | Brazil | Cosmetics | 28.335 | 23.0109 | 7 |
| 2024-01-26 | Canada |  | 20.185 | 23.0109 | 9 |
| 2024-01-04 | France | Cereal | 25.26 | 28.7964 | 9 |
| 2024-01-09 | Brazil | Cereal | 44.575 | 50.8155 | 8 |
| 2024-01-14 | Brazil | Snacks | 20.185 |  | 4 |
|  | Brazil | Cosmetics | 40.485 | 46.1529 | 2 |


The BINNING operation will give you the below results

The new calculated column **"Age Bracket"** will return

| ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY | AGE BRACKET |
|---|---|---|---|---|---|---|
| 03-01-2024 | Brazil | Baby Food | 38.41 | 43.7874 | 2 | Medium Price |
| 07-01-2024 | Japan | Spices | 45.56 | 50.8155 | 20 | High Price |
|  | Japan |  |  | 43.7874 | 10 | Low Price |
| 18-01-2024 |  |  |  | 32.3019 | 4 | Low Price |
| 22-01-2024 | Brazil | Cosmetics | 28.335 | 23.0109 | 7 | Low Price |
| 26-01-2024 | Canada |  | 20.185 | 23.0109 | 9 | Low Price |
| 04-01-2024 | France | Cereal | 25.26 | 28.7964 | 9 | Low Price |
| 09-01-2024 | Brazil | Cereal | 44.575 | 50.8155 | 8 | High Price |
| 14-01-2024 | Brazil | Snacks | 20.185 |  | 4 | Low Price |
|  | Brazil | Cosmetics | 40.485 | 46.1529 | 2 | High Price |


