Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

What is the function used to treat null values?

Hi,

I wanted to replace null values with 0 or 1 ,so how can I achieve it in Qlikview?

For example: ifnull(column1, 0)

explanation: If column1 is null then it will replace null values to 0.

Thanks.

Labels (1)
4 Replies
rubenmarin
MVP
MVP

Hi Rashika, maybe with IsNull():

If(IsNull(Column1), 0)

Also, to count empty spaces as null this can be used:

If(Len(Trim(Column1))=0, 0)

Anil_Babu_Samineni
MVP
MVP

May be this?

If(IsNull(column1), 0)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
swuehl
Champion III
Champion III

jonathandienst
Partner - Champion III
Partner - Champion III

Alt() is the function in QV that is much like your ifnull() example. It will return the first valid numericvalue, so it is good for dates and amounts. It does not handle text values.

example:

     Alt(column1, 0)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein