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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.exploratory.io/data-wrangling/case_when.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
