Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Changing null

Hey,

How do I go about changing Null values in my table to zero or 1?

Thanks!

8 Replies
Anonymous
Not applicable
Author

If you mean a database table, you can use the statement:
set NullDisplay='0';
in your script to replace all NULL values with 0.

If you mean in a pivot or straight table, you can set the Null Symbol value on the Presentation tab of the Properties dialog.

-Phil

Not applicable
Author

Is there a way to specify it to one column in a table and not the others?

MayilVahanan

Hi,

Try this ,

=if(Columnname = '' , 1, Columnname)

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

If it is a database load, you may have to use:
If(isnull(Columnname),1,Columnname) as Columnname

-Phil

Sokkorn
Master
Master

Hi,

This one would work

IF(IsNull(Field) OR Len(Field)>0,0,Field)

Hope this help.

Regards,

Sokkorn

Not applicable
Author

hi,

If you want to do it in backend then ,

before the  starting of the script you need to write:

to set null value as 1

NULLASVALUE *;

SET NullValue =1;

Similarly you can do to set null values as 0.

I Hope this will solve your purpose.

Pratibha

Not applicable
Author

It loads but does not change because the NULL values that I have are in that column but in a different table. I went to the presentation tab on the table box and could not find the options.

I have three options in the column on the new table. No, Yes, and NULL.

I need to change the No to a 1, the Yes to a 0, and the NULL to a 0.

The No and Yes are in the original load, the NULL happens when I put this column into a different table after its loaded in. The new table is a table box.

Not applicable
Author

It loads but does not change because the NULL values that I have are in that column but in a different table. I went to the presentation tab on the table box and could not find the options.

I have three options in the column on the new table. No, Yes, and NULL.

I need to change the No to a 1, the Yes to a 0, and the NULL to a 0.

The No and Yes are in the original load, the NULL happens when I put this column into a different table after its loaded in and compared to my key. The new table is a table box.