Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR June 25, 2025: Build on Apache Iceberg with Qlik Open Lakehouse - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
olenedderhoff
Contributor II
Contributor II

Unable to filter out null values

I have two columns, customerID and date. Not every customerID has a date. I want to filter out all of those lines where the customerID does not have a date. 

I have tried it multiple ways, always in the WHERE part or tried to create a flag, that was supposed to be 1 when there was a date and 0 if there was not. I have tried out all of the functions inside of an in-app-table as well.

But whether I use isNull(date) or len(trim(date)) = 0 or any other function, as soon as the date is null in the table, every function just returns null as well. This way it is impossible for me to filter out the null values.

olenedderhoff_1-1748268508489.png

How can I get an actual 1 or 0 out of the null values?

Labels (3)
4 Replies
Qrishna
Master
Master

As Long as your Dimension is customerID is the key column in the table, ou cannot filter out the nulls in other other columns. so make sure date column is also a key column and then you check 'Suppress When Value Is NULL'. 

Jackyjoan
Contributor
Contributor

This can happen due to improper use of filtering functions or inconsistent data formatting. To resolve this, ensure you're explicitly checking for null or undefined values in your code or query.

Tag: calculo de finiquito

Lazar1
Contributor III
Contributor III

Easiest way is to create master dimension of that field with statement if(isnull(filed_name),'null',field_name).

The same you can do in data load editor (script).

Richerd-the
Contributor
Contributor

If you're struggling to filter out rows where customerID has no date, the issue likely stems from how nulls behave in expressions—most functions return null when used on null values. To work around this, create a calculated field using if(isnull(date), 'null', date) and then filter out the rows with 'null'. You can apply this logic either directly in your chart expressions or within the data load editor. Additionally, make sure the date column is recognized as a key field and check the option "Suppress When Value Is NULL" to cleanly exclude empty values from your results.

Tag: Mein Bmirechner