Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
linoyel
Specialist
Specialist

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
Partner
Partner

you can use a calculated dimension as below:

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

View solution in original post

6 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

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

- Marcus

linoyel
Specialist
Specialist
Author

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

marcus_sommer
MVP & Luminary
MVP & Luminary

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

linoyel
Specialist
Specialist
Author

Yeah, it doesn't work either.

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

Thanks!

agigliotti
Partner
Partner

you can use a calculated dimension as below:

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

linoyel
Specialist
Specialist
Author

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