Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Tags (3)
2 Replies
MVP
MVP

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

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

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

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

Community Browser