Skip to main content

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

New function: IfNull()

vegard_bakke
Partner - Creator III
Partner - Creator III

New function: IfNull()

I'd love to have an IF-null function, that basically replaces NULL values.

 

And the clunky:
    If ( IsNull(<big long expression>), 'default', <big long expression> )
could be replaced with:
   IfNull( <big long expression>, 'default') 

 

Just like: https://www.w3schools.com/sql/func_mysql_ifnull.asp

 

5 Comments
andoryuu
Creator III
Creator III

This would make code cleaner and easier to read.  

Thomas_Spitzer
Contributor III
Contributor III

Even better would be a function like Alt() with unlimited parameters, that works not only on numbers but also on strings (something like AltNull()). 

Or
MVP
MVP
This could be implemented quite easily by expanding the Alt() function to accept non-numeric inputs, too. We don't even need a new function.
Patric_Nordstrom
Employee
Employee

Thank you all for your feedback on ways to improve our product. While this is something we understand would be useful, it's not on the short-term roadmap. Please continue to show your support for this idea.

Thanks, 

Patric

Status changed to: Open - Collecting Feedback
Patric_Nordstrom
Employee
Employee

The Coalesce() function does that, returns the first non-null value in a list. Can be used like this:

Coalesce( big long expression, default)

Coalesce is not documented but will be in a near future.

Thanks,
Patric

Status changed to: Closed - Already Available