Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner
Contributor III
Contributor III

Replacing Null Values with Unknown

Hi,

I have a field with some of the data being null values (blank). I would like to show those blank cells as 'Unknown'. 

 

Right now my measure is Count([Status])

 

Should it look something like this in my measure?

 

Count ([Status]) & if(isnull([Status]), 'Unknown' [Status])

 

It is showing an error for me: ')' expected

1 Solution

Accepted Solutions
Beginner
Contributor III
Contributor III
Author

Nevermind, I just used the Replace feature in Data Manager to replace all Null values with Unknown

View solution in original post

4 Replies
OmarBenSalem

In the script, change ur field as follow:

 

if(len(trim(Status))=0,'Unknown',Status) as Status

OmarBenSalem

If u don't want to alter ur script (which is the best approach)

You can try the NullCount funtion

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/CounterAggrega...

Beginner
Contributor III
Contributor III
Author

Is there a way besides altering the script? Can I add an expression to my measure/dimension?
Beginner
Contributor III
Contributor III
Author

Nevermind, I just used the Replace feature in Data Manager to replace all Null values with Unknown