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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading only rows when a condition exists in another table

How would I go about loading the rows of a table when x condition is present in another table?

For example, if I have an telephone number spreadsheet with a key column with 1000 items (numbered 1-1000).  In another spreadsheet that only contains numbers I have actually called, I have the the same key column, but only certain numbers are populated (ie:  500, 501, 515, 516, 523, etc...).   When creating my qlikview table, I only want to load the telephone in the qlikview telephone table when it exists in the table of numbers that I actually called.

4 Replies
Not applicable
Author

You can use where exists functionality of QlikView

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this:

Calls:

Load telnum, ...other fields... from ...mycallstable...;

Phonebook:

Load telnum, ...other fields... from ...myphonebook...

where exists(telnum, telnum);


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks... actually my field names in each table are different.  When I try with both field names, I get an error in the calls table that "telnumcalls" does not exist.

Not applicable
Author

You can use following code as example else pl upload your Qvw.

History:
Load Order_No,

Price_Value
from Sales.qvd(Qvd)

;

Load Order_No,

Sale_Value

from Order.qvd(Qvd)

where exists(Order_No, Order_No)
;