> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exploratory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Assign New Values by Setting Conditions - Case When

You can assign new values to a column by setting conditions with easy-to-use dialog UI.

## How to Access?

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_column_menu.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=b94e734513235c2eeefb9fb141d87543)

* From Column Menu on Character Column, select "Replace Values" -> "With Conditions".

## How to Use?

### Select Target Columns

You can select a column or multiple columns for this operation. To select multiple columns, check the checkboxes for the columns you want to perform this operation.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_multiple_columns.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=e7a3332afa10b2deaa5de0e29f0b252f)

### Set Condition and New Values

To assign new value, you need to set a condition. For example, if you want to assign 100 for the case where City column value is "Tokyo" like below screenshot,

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_dialog.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=931324212bd87111ad28ee916f202093)

then you can click the condition and set it in the Filter like dialog.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_condition.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=4ebe50b3dbe08d502ecabc34d85433e0)

#### Reorder Conditions by drag and drop

You can drag and drop a condition to reorder conditions.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_condition_dnd.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=dbe6e7bacd35741feca1ff476dfdc4b5)

#### Duplicate Conditions

Click the duplicate icon to duplicate a condition.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_duplicate_condition.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=ed4893abde257bce4ef800a9262ffb81)

#### Disable / Enable Conditions

Click the Disable (or Enable) icons to toggle Condition state.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_disable_condition.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=372807c299d2a901737135ef2ab3e9c4)

### Set New Values

To set a new value for each condition, you can select either of followings:

* Input Field (Text Input Field for Character column and Number Input Field for for Numeric column.)
* Column
* NA
* Calculation

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_new_value.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=197e32add0d1cf33369db2f91c32c4d5)

To change the type, click the button label and select the available option.

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/case_when_new_value_type.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=feb5cbe778b677351827c14236633b37)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.