Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

If condition in where clause during data load

Hi all,

I have a data set with the following sttucture

TypeDateValue
A1/1/200110
A2/2/200120
B15
B90
A70

The Data is such that Type B will always have null in Date Column. While loading the data, I need to filter all values where Date is null for Type A. In this case, I should not load the last row. How can I achieve this while loading the script? Any help?

I tried the below and it doesn't seem to work:

where ( if([Type]='A', [Date]>0));

Tags (4)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: If condition in where clause during data load

(Type = 'A' and len(trim(Date))>0) or Type='B'

View solution in original post

6 Replies
Highlighted
MVP
MVP

Re: If condition in where clause during data load

to get records with Type = 'A' and Date not null you can use len(trim(.....))

load

     ....

from

     .....

where

     Type = 'A' and len(trim(Date))>0

     ;

Highlighted
Not applicable

Re: If condition in where clause during data load

But I would also like to keep records where Type='B' and date will be null for them

Highlighted
MVP
MVP

Re: If condition in where clause during data load

(Type = 'A' and len(trim(Date))>0) or Type='B'

View solution in original post

Highlighted
Valued Contributor III

Re: If condition in where clause during data load

Could you use <>

where

Type <> ('A' and len(trim(Date))>0))

Highlighted

Re: If condition in where clause during data load

Where not (Type='A' and IsNull(Date))

Highlighted

Re: If condition in where clause during data load

Where Type<>'A' or not IsNull(Date)