

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis: selections on empty fields
Jun 8, 2022 5:34:49 AM
Jun 8, 2022 5:34:49 AM
When a selection is done by Set Analysis on a field that only has NULL-values, then Set Analysis doesn't exclude the values but actually includes all of them.
On the other side, if the field has even just one other value in the datamodel, then Set Analysis excludes the NULL-values.
The behavior can be rephrased with an example:
Consider 2 fields in data model
- Field1 has values: NULL NULL NULL NULL
- Field2 has values: NULL NULL NULL NORWAY
Set Analysis is done to both fields with ={"FINLAND"}. The result is different even if there is no value to select in both fields:
- When the selection is done on Field1, all the values are shown, like no selection is done at all.
- When the selection is done on Field1, no value is shown, so no value is selected.
In general: applying Set Analysis on any values on a NULL field shows all the field values (as no selection is applied). Applying Set Analysis on a non existent value of a filed containing at least one value (even just a blank space) shows 0 as result.
This article explains why this is the desired behavior and what is the logic behind.
Environment
- Qlik Sense and QlikView all versions
- Qlik Cloud
Resolution
Considering the example above, the selection
{<Field2={"FINLAND"}>}
(which is correctly evaluated to “0” in this case) is not logically equivalent to
{<Field1={"FINLAND"}>}
(which correctly shows all values, i.e. no selection).
In fact “no selection” (empty set => no selection => all values possible) is different from “false condition” (no values possible) so the latter actually correspond to an empty SET which is equivalent to:
{$ <Field1 = >} (which is correctly evaluated to "All values")
There is indeed a difference (as expected) in selections between a field containing a value and a field that contains no values (only null) since it is not possible to make any selections in a field with only null values.
Cause
This is the logic behavior of Set Analysis when a selection is performed on an empty field.
Internal Investigation ID
QB-10613