# NullCount - chart function

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

Syntax:

NullCount({[SetExpression][DISTINCT] [TOTAL [&lt;fld {,fld}&gt;]]} expr)

Return data type: integer

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| expr | The expression or field containing the data to be measured. |
| set\_expression | By default, the aggregation function<br>will aggregate over the set of possible records defined by the selection.<br>An alternative set of records can be defined by a set analysis<br>expression. |
| DISTINCT | If the word<br>DISTINCT occurs before the function<br>arguments, duplicates resulting from the evaluation of the function arguments are disregarded. |
| TOTAL | If the word<br>TOTAL occurs before the function<br>arguments, the calculation is made over all possible values given<br>the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions.<br><br>By using TOTAL [&lt;fld {.fld}&gt;], where the TOTAL qualifier is followed by a list of one or more field names as a subset of the chart dimension variables, you create a subset of the total possible values.<br><br>[Defining the aggregation scope](https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/define-aggregation-scope.htm) |

Examples and results:

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=;`