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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to replace null values

Hallo guyz,

I have a dimension where mapping has been implemented. I tried including null() to be replaced with a value but it is not working. What am i doing wrong? Please have a look at the attachment if you want to have a look.

Thanks in advance.

1 Solution

Accepted Solutions
beck_bakytbek
Master
Master

8 Replies
trdandamudi
Master II
Master II

Instead of mapping you can use the below:

Place the below two line at the start of the script:

NullAsValue *;

Set NullValue = 'Test2';




beck_bakytbek
Master
Master

Hi Ismael,

check this: Show date Dates with 0 value if data not available

i hope that helps

beck

Not applicable
Author

Hi Thirumala,

I only want to replace null values from a specific field. Will yours replace all null values?

trdandamudi
Master II
Master II

Yes, you can do that as below. Say for example you have fields A,B and C and you want to apply null for field A then do as below:

NullAsValue A;

Set NullValue = 'Test2';


If it is one filed you can also do as below in the script:

if(isnull(columnName), 'Test2',columnName)


Note: replace columnName with the right column in your source.

Not applicable
Author

Thx for the assistance, the isnull part didnt work with my issue. I changed it to len() after reading becky's link. So both of you, thank you very much.

Not applicable
Author

Thx for the assistance, the isnull part didnt work with my issue. I changed it to len() after reading becky's link. So both of you, thank you very much.

trdandamudi
Master II
Master II

You are welcome... Glad you got the solution..

beck_bakytbek
Master
Master

Hi Ismael,

Glad to help you, Learning by doing, You are welcome

beck