# 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://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-a85a8646ebf49dcf8b6d62f23b6728308196a7c2%2Fcase_when_column_menu.png?alt=media)

* 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://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-d23e76815abeb020ce7980cd2570691e0f290051%2Fcase_when_multiple_columns.png?alt=media)

### 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://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-60c5daf3393fb85d0eefa01db2ae935dd6645b29%2Fcase_when_dialog.png?alt=media)

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

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-c1e30b28acaab516de5744cd16b4b31edbb2c835%2Fcase_when_condition.png?alt=media)

#### Reorder Conditions by drag and drop

You can drag and drop a condition to reorder conditions.

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-472aab8f94e4a4fc7885ecb5e8cc9ecabbdbf5b4%2Fcase_when_condition_dnd.png?alt=media)

#### Duplicate Conditions

Click the duplicate icon to duplicate a condition.

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-2b2b45953f5b3d4f0105b2d45807cf426f6d5f59%2Fcase_when_duplicate_condition.png?alt=media)

#### Disable / Enable Conditions

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

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-65f81b7d4ccd08897b5ade276230bf4248492ffa%2Fcase_when_disable_condition.png?alt=media)

### 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://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-0938488ff8b477944861c7cd110818c86c07da51%2Fcase_when_new_value.png?alt=media)

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

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4HLCK3olgduYoe3RVS%2Fuploads%2Fgit-blob-ef9d6064f4069178f19cd188d20de6464457e46d%2Fcase_when_new_value_type.png?alt=media)
