5 Replies Latest reply: Jun 6, 2011 7:35 AM by Vinoth Rajen RSS

    how to handle null values in qv



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




        • how to handle null values in qv
          Erich Shiino


          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,



          • how to handle null values in qv

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

            • how to handle null values in qv

              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.