Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView load not exists in

Hi,

I am creating a QlikView dashboard with sales data tables dependent on a series of filters.

For example.

Sales based on keywords in the product name

Sales from website search words

Sales based on the page path the customer went through before making the sale

These tables will have some overlap of sales dependent  on a customers behaviour, so if a customer searched a word and then bought a product with a keyword in it, they would be in the search and the keyword tables.

The distinct order number is in each table. 

How do I exclude orders from the search and pagepath tables if they are in any of the other tables.  I wan't to keep orders in the search table that are not in the keywords table and keep orders in the pagepath table that are not in the search or keywords table?

Thanks in advance

Michelle

2 Replies
swuehl
MVP
MVP

I think you can use NOT EXISTS() for this:

KEYWORDS:

LOAD Keyword,

          OrderNo

FROM ....;

SEARCH:

LOAD Search,

          OrderNo

FROM ....

WHERE NOT EXISTS(OrderNo);

PAGEPATH:

LOAD PagePath,

          OrderNo

FROM ....

WHERE NOT EXISTS(OrderNo);

EXISTS() will check existince of the value in field OrderNo, i.e. if the specific OrderNo has already been loaded into QV in a previous or the current LOAD.

This does also mean that these tables need to load OrderNo first in your app, if there is another table loading OrderNo, you should load this table after the above three tables (or, alternatively you need to use EXISTS() with two arguments and a renamed field).

Hope this helps,

Stefan

Not applicable
Author

Thanks Stefan, I'll try this!