Use null or empty values in a filter
This article applies to the following Customer Insights roles: Viewer; Developer
One of the most confusing things about database querying (which, at heart, is what Customer Insights really is) is the difference between null values and blank values. You might have noticed that the operators dropdown list includes both the operators is blank and is null. Thatβs great, except for one thing: whatβs the difference between a blank value and a null value?
To be honest, the answer to that question is perhaps more philosophical than it is practical. In database terms, however, a null value is a value that doesnβt exist: the field does not contain a value of any kind (not even a blank value). By contrast, a blank value is a real value: it just happens to be a string value containing 0 characters. Two scenarios are largely responsible for blank values:
-
The user fails to complete a field on their registration form. For example, a user does not enter his or her country or phone number.
-
Your registration form is configured to save empty fields as blank values rather than null values.
Fortunately, all you really need to know is this: blank values are possible only when working with strings. For example, click on an operator for any other datatype and you wonβt see either the is blank or the is not blank operators listed:
Consequently, the blank/null distinction doesnβt apply if youβre working with datetime or numeric values. And what if you are working with string values and you want to filter out items that donβt seem to have a value? In that case, just filter out both blanks and nulls:
Do that and youβre covered regardless of whether that empty value is blank or null.
Updated over 1 year ago