Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display hardcoded value instead of displaying null when the match is not found in lookup

Hi All

May I know how to Hardcode the value is the match is not found using "LookUp" function. Usually if the match is found then it returns the matched value, but what if I want to return the hardcoded value if the match is not found instead of displaying null values. Also let me know if the same thing can be done with any other function instead of using lookup.

Hope my question is understandable! If not please let me know...

Thanks

Attitude

2 Replies
swuehl
MVP
MVP

Hi Attitide,

you may have a look at the mapping functions, there you could also define a default value.

Without trying myself, I think something like

if(isNull(lookup(...))=0,lookup(...), 'default')

should work also.

Alternatively, you might change the NULL value representation symbol (which could be also a text) .e.g. in chart properties presentation tab.

Regards,

Stefan

Not applicable
Author

Hi Stefen

Thanks for your help!

Before seeing your post I have already tried below code which you have suggested and looks like it works but still not tested though.But felt happy that same thing has been suggested by you. 🙂

if(isNull(lookup(...))=0,lookup(...), 'default')

Yet to look into the mapping function which you have suggested. But don't think changing null value representation will work out as I need to use it for calculation in the expression.

Will try to look into the mapping function and will get back to you.

Thanks

Attitude