Exploratory Community

How to create a new column based on the condition with other column values

#1

Suppose you want to create a new column with the below conditions:

  • If some column contains “year”, create a new column with 365
  • If some column contains “month”, create a new column with 30

To do so, select Replace Values -> With Conditions from the column menu.

Then set condition with operator as “Contains” and 'Value` as “year”

Then click the Ok to set the condition.

Click the New Value field and set 365.

Once it’s done first condition is set so repeat the same for “month” case.

1 Like