When data is imported into a table, and a column doesn't have any values. it is imported as NULL. Within databases, a NULL value signifies that the value is unknown. It does not indicate a value of 0.
This article will go over different scenarios to explain how Sisense performs calculations that involve NULL values.
When you SUM values that are NULL, Sisense finds unknown information, rather than 0. This is an important distinction to have, because the sets [1,-1] and [NULL,NULL] should have different results when you aggregate them. 1+(-1)=0. Unknown+Unknown=Unknown.
SUM(NULL) + 1 = ‘No Results’
This one could be interpreted as unknown value + 1=unknown. You could think of this in algebra terms, where SUM(NULL)+1 is equivalent to x+1. There are infinite possible values for that equation, since x is an unknown variable. Unknown+1 is still unknown.
COUNT(NULL) = 0
Counting operations will return numeric values since they are not interpreting the actual values, but counting the rows based upon the values. In this scenario, we want the number of distinct values in the set [NULL, NULL]. The values in this column are all unknown, so there are no distinct values. Since we can't determine what the values are, they aren't considered. Its like counting the number of values in an empty table, which gives a result of 0.
COUNT(NULL) + 1 = 1
You can think of COUNT(NULL) + 1 as 0+1 in this scenario. Since the count operation gives us a numeric value, we can add any number to it and have a definite, known answer.