Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script where clause multiple values

Hi everyone,

I am trying to execute a where command in the Qlikview script to restrict the data which is loaded in from an Excel spreadsheet. It works fine when I put in the first greater than date, but fails when I need to put in the greater than OR blank value for the date field.

i.e.. I am looking to get the data set to be the workers which joined in the UK; from these workers their join date of first of Jan 2017 or their join date is blank.

my code which works fine is:

Load ....

[Employees]

[Join Date]

from....

where ([Employees] = 'UK' And [Join Date] >= '01/01/2017');

my code which fails when I also need the blank values

Load ....

[Employees]

[Join Date]

from....

where ([Employees] = 'UK' And ([Join Date] >= '01/01/2017' Or [Join Date] = ' '));

I am not sure if this is a syntax issue or the blanks are not being recognised as the total value does not increase, even though I know there is a large quantity of blanks to be counted.

Any help appreciated

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Your Code is looking fine. May be try the alternate way

where [Employees] = 'UK' And ([Join Date] >= '01/01/2017' Or Len(Trim([Join Date]))=0);

View solution in original post

2 Replies
settu_periasamy
Master III
Master III

Your Code is looking fine. May be try the alternate way

where [Employees] = 'UK' And ([Join Date] >= '01/01/2017' Or Len(Trim([Join Date]))=0);

Not applicable
Author

That's sorted it, many thanks for your quick response.