> For the complete documentation index, see [llms.txt](https://docs.exploratory.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exploratory.io/data-wrangling/case_when.md).

# 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?

![](/files/XlsUAZTkonJotxZFw9Xu)

* 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.

![](/files/UUZxLUpAwjrXGC9ByBBL)

### 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,

![](/files/BYeuZYlLI2jGX5S1qN54)

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

![](/files/pL4GuvDFffOwwc8rpDeR)

#### Reorder Conditions by drag and drop

You can drag and drop a condition to reorder conditions.

![](/files/zywQxyCDytHTVb3ZarUm)

#### Duplicate Conditions

Click the duplicate icon to duplicate a condition.

![](/files/EyasTnfLRBWEIxNrcGcq)

#### Disable / Enable Conditions

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

![](/files/vvmUiPlcdoHaUtkxuQ9Z)

### 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

![](/files/Z4ypnldd0HvGgGOFCRcA)

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

![](/files/T92QLgAREajJJjTUp7sR)
