Skip to main content
Announcements
Qlik Connect 2025! Join us in Orlando join us for 3 days of immersive learning: REGISTER TODAY

Set Analysis: selections on empty fields

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrea_Bertazzo
Support

Set Analysis: selections on empty fields

Last Update:

Jun 8, 2022 5:34:49 AM

Updated By:

Andrea_Bertazzo

Created date:

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

Labels (3)
Contributors
Version history
Last update:
‎2022-06-08 05:34 AM
Updated by: