Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rutitr14
Contributor

How to replace null() by value - Qliksense

Hi ,

I create a table in qliksense,

I want to replace the value null to 'N/A' in each field.

I used in the following expression , but it doesn't replace to the value , and stay null:

=if(IsNUll(NAME), 'NA', NAME)

Could you please advice?

Thank's!

1 Solution

Accepted Solutions
rutitr14
Contributor

Re: How to replace null() by value - Qliksense

Hi,

Thank you for you help , the following expression works:

aggr(if(isnull(NAME),'Other',NAME),NAME)

17 Replies

Re: How to replace null() by value - Qliksense

Try

=if(IsNUll(NAME) = -1, 'NA', NAME)

rutitr14
Contributor

Re: How to replace null() by value - Qliksense

Thank you for your response... also this option doesnt work

thiago_justen
Valued Contributor III

Re: How to replace null() by value - Qliksense

Let's try something different:

What about Alt function?

Alt(NAME,'N/A') - this will replace every missing data with "N/A".

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

Re: How to replace null() by value - Qliksense

Are you sure that field is null? Maybe it is empty?

Try if(NAME='', 'N/A', NAME)

rutitr14
Contributor

Re: How to replace null() by value - Qliksense

Thank you for your response,

I try as you suggest -  it's replace everything to N/A except the null value

rutitr14
Contributor

Re: How to replace null() by value - Qliksense

Thank you for your response,

I try it but it didn't work ...

if i write = if(NAME='', 'N/A') , only the null value stay but in the display it didn't show the 'N/A' value....


thiago_justen
Valued Contributor III

Re: How to replace null() by value - Qliksense

Sorry, just a one mistake - this function check for a valid number representation.


So, do this:


Alt(num#(NAME),'N/A')

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

Re: How to replace null() by value - Qliksense

try

if(len(trim(YouField))=0,'N/A',YouField)  as urField

rutitr14
Contributor

Re: How to replace null() by value - Qliksense

Thank you for your response -

the len of null return null , so it doesn't work