Chris Smith
Chris Smith

Reputation: 409

Replace null values in cell

I am unable to replace null values in cells. I have created a facet to only display cells that have null values. I then went to edit cells > Transform function and tried to use the replace function but it does not seem to be working.

Different things I have tried:

replace(value, null, 'other_text')
replace(value, 'null', 'other_text')

I expected the null values to be replaced with 'other text'

Screenshot:

enter image description here

Upvotes: 7

Views: 8529

Answers (1)

CennoxX
CennoxX

Reputation: 808

You are not replacing the value null, but the string 'null'. The correct syntax for replacing is value.replace('old','new') or replace(value,'old','new'). But replacing doesn't work on null. You should either create a facet for null-values (your current screenshot shows some non-null-values) and fill the expression field with 'new' or you could do something like if(value==null,'new',value).

Upvotes: 11

Related Questions