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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
GHasan
Contributor III
Contributor III

Qlik Sense QVD Load

Hi, 

Is there a way to do a "or" statement in "where" clause while loading qvd? for example I have Table_A & Table_B which will be joined by a master_key. If I do: 

Load * 
Table_A
Where Table_A.Col1 is not null ;

Load *
Table B
Where Table_B.Col2 = "XYZ"; 

it works as "and" statement. 

I want something like 

Load * 
Table_A;

Load *
Table B; 

Where Table_A.Col1 is not null or Table_B.Col2 = "XYZ"


Any suggestion would be much appreciated. Thanks in advance

1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

Hi

Try like below

MainTable:

Load * , Col1 from tableA;

Left join (MainTable)

Load * , Col2 from tableB ;

 

FinalTable:

NoConcatenate

Load *

resident MainTable where (not isnull(Col1) or Col2 = 'XYZ');

Drop table MainTable;

 

In Qlik,instead of "Table_A.Col1 is not null" , need to use "not isnull(Col1)".

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi,

You need to bring both the columns into one table first using join. And then apply or in where condition.

E.g 

MainTable:

Load * , Col1 from tableA;

Left join (MainTable)

Load * , Col2from tableB 

 

FinalTable:

Load *

resident MainTable where Col1 is not null or Col2 = "XYZ"

 

Thanks,

Ashutosh

 

 

 

 

 

 

 

 

 

 

MayilVahanan
MVP
MVP

Hi

Try like below

MainTable:

Load * , Col1 from tableA;

Left join (MainTable)

Load * , Col2 from tableB ;

 

FinalTable:

NoConcatenate

Load *

resident MainTable where (not isnull(Col1) or Col2 = 'XYZ');

Drop table MainTable;

 

In Qlik,instead of "Table_A.Col1 is not null" , need to use "not isnull(Col1)".

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Thanks for the correction @MayilVahanan ,

I missed that part to correct

GHasan
Contributor III
Contributor III
Author

Thanks, it worked! 

GHasan
Contributor III
Contributor III
Author

Thanks!