Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jsf_fasoli
Contributor II

Replace null value with text

Hello everyone

I'm working in Qliksense with a table like this:

NullValues.PNG

For some plan types there is no value for client type. I need those records to be considered as Person.

I've tried if (isNull("Client Type"), 'Person', "Client Type") but nothing has changed.

Any thoughts?

Thanks!

10 Replies
dwforest
Valued Contributor

Re: Replace null value with text

Usually works best if you can resolve the null values during data load if possible; not a direct solution but may be a viable workaround for some.

thiago_justen
Valued Contributor III

Re: Replace null value with text

As David said, should better resolve it into load script. But you may try something like this:

If(len(trim("Client Type"))= 0 or "Client Type"='NULL' or "Client Type"='-', 'Person', "Client Type" )


Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
jsf_fasoli
Contributor II

Re: Replace null value with text

It doesn't work

jsf_fasoli
Contributor II

Re: Replace null value with text

It would be preferrable if it could be done on the front-end

Re: Replace null value with text

Whilst you may prefer a front solution, the way to go is a back end script solution.

ali_hijazi
Honored Contributor

Re: Replace null value with text

you can use the below as an example

:

NullAsValue A,B;

Set NullValue = 'n/a';

LOAD A,B from ...

zebhashmi
Valued Contributor

Re: Replace null value with text

If(len(trim(Client Type))= 0, 'Person', Client Type)

jsf_fasoli
Contributor II

Re: Replace null value with text

Doesn't work either

thiago_justen
Valued Contributor III

Re: Replace null value with text

Could you please give us an example App?

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Community Browser