Skip to main content
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.

4 Replies
rubenmarin

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

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

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