Skip to main content

NullCount

NullCount() is used to aggregate the number of NULL values in each chart dimension.

Syntax:  

NullCount([{SetExpression}][DISTINCT] [TOTAL [<fld {,fld}>]] expr)

Return data type: integer

Arguments:  

  • expr: The expression or field containing the data to be measured.
  • SetExpression: By default, the aggregation function will aggregate over the set of possible records defined by the selection. An alternative set of records can be defined by a set analysis expression.
  • DISTINCT: If the word DISTINCT occurs before the function arguments, duplicates resulting from the evaluation of the function arguments are disregarded.
  • TOTAL: If the word TOTAL occurs before the function arguments, the calculation is made over all possible values given the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions. The TOTAL qualifier may be followed by a list of one or more field names within angle brackets <fld>. These field names should be a subset of the chart dimension variables.

    Defining the aggregation scope

Examples:  

Examples and results
Example Result
NullCount([OrderNumber]) 1 because we have introduced a null value using NullInterpret in the inline LOAD statement.

Data used in example:

Set NULLINTERPRET = NULL;

Temp:

LOAD * inline [

Customer|Product|OrderNumber|UnitSales|CustomerID

Astrida|AA|1|10|1

Astrida|AA|7|18|1

Astrida|BB|4|9|1

Astrida|CC|6|2|1

Betacab|AA|5|4|2

Betacab|BB|2|5|2

Betacab|DD|||

Canutility|AA|3|8|

Canutility|CC|NULL||

] (delimiter is '|');

Set NULLINTERPRET=;

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com