Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to handle null values in qv

Hi,

  please any one explain 'how to handle null values in qv'

Thanks

Reddy

5 Replies
erichshiino
Partner - Master
Partner - Master

Hi,

There are many ways to handle it.

You can test if a value is a null with the isnull( expression )

you can generate a null value with null()

You can use nullcount() as you use count() to count null values (script or in a chart)

You can use NullasValue to define the the null values in a field should be considerer as regular values for selections.

The syntax is:

NullAsValue A,B; // to apply this to fields A and B

You can go to help on QV and search for null to get more details

Hope this helps,

Erich

siva_boggarapu
Creator II
Creator II

Hello Narendra Reddy,

I hope that is good answer what he(Erich Shiino) posted. Better go thourgh the QlikView Reference manual. It will come automatically once you install QlikView software.

Not applicable
Author

You can find information in the document QlikView Reference Manual (cf 24.10)

Not applicable
Author

It does sound like

Not applicable
Author

There are lots of Null values floating around in data and QlikView has some interesting ways to deal with it.

For example, we can turn on the NullAsValue option for a field that we are going to load:

Syntax : NullAsValue A, B;

Any values that were previously Null (and do not display in a list box) will now display as blank strings.

There is a small problem when you want to do any maths on a field that might have a Null value and that is that any number plus Null is Null. A great way to deal with this is, if I expect there might be Null values in a field, to use the Alt() function.

Alt accepts a list of values and will return the first of those values that has a valid number. So, instead of:

Load A+B as AB, ...

I can have:

Load Alt(A,0)+Alt(B,0) As AB, ...

Now, if either A or B have a Null value, it is treated as zero and my calculation can continue and give a good result.