If given column is blank returns a given value

Solved!
LaurentS
Level 3
If given column is blank returns a given value

Hello,

I have tried several ways, but it remains in error:

(1) I have a given columpn (say ColA) in which there are empty values

(2) I want to create a new column, given the formul : If in ColA, there is blank value, then returns 'Missing', otherwise, returns 'Present'.   To do this,  I am using the recipe 'Cleaning' and using the formula ("add a new step")

Here is the formula and I do not understand why it is invalid

if (ColA isBlank,'Missing','Present')

Thanks for your help.

0 Kudos
1 Solution
AlexT
Dataiker

Hi Laurent,

You should be able to use the syntax :

if (isBlank(ColA),'Missing','Present')

Screenshot 2021-07-19 at 11.04.14.png

View solution in original post

2 Replies
AlexT
Dataiker

Hi Laurent,

You should be able to use the syntax :

if (isBlank(ColA),'Missing','Present')

Screenshot 2021-07-19 at 11.04.14.png

LaurentS
Level 3
Author

Hi and thanks, it was indeed just a question of syntax.  Kindest regards.

0 Kudos