Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

linoybar
Contributor III

Replace Null values with string value in UI

Hi, is it possible to replace  field's Null values with some string value in UI?

I know I can do it in the script but I need it in UI in the table and in bar chart dimension without manipulating the script.

=if(IsNull(MyField), 'SomeString', MyField) doesn't work in UI and I still see "-" symbol when the value is Null.

1 Solution

Accepted Solutions
agigliotti
Honored Contributor II

Re: Replace Null values with string value in UI

you can use a calculated dimension as below:

Aggr( if( len(trim(MyField))=0, 'SomeString', MyField), MyField )

6 Replies

Re: Replace Null values with string value in UI

You could try it with: =if(len(trim(MyField))=0, 'SomeString', MyField)

- Marcus

linoybar
Contributor III

Re: Replace Null values with string value in UI

Len function doesn't work either cause you can't use it on Null value

Re: Replace Null values with string value in UI

It's depending on the datamodel and how and where the data should be displayed if the occurance of NULL could be fetched or not. Quite often is it necessary to create the missing data within the script - but before try this one:

alt(myField, 'Some String')

- Marcus

linoybar
Contributor III

Re: Replace Null values with string value in UI

Yeah, it doesn't work either.

I guess I'll have to do it in script anyway.

Thanks!

agigliotti
Honored Contributor II

Re: Replace Null values with string value in UI

you can use a calculated dimension as below:

Aggr( if( len(trim(MyField))=0, 'SomeString', MyField), MyField )

linoybar
Contributor III

Re: Replace Null values with string value in UI

Cool!!! Andrea, that works!!! Thanks so much!