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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JonathanKelly
Contributor III
Contributor III

Where value is not in list

I am loading in a course list - I have a separate QVD which shows courses that are not required in my count.

How would I state in a load script that I want to load in all the course except where that course shows in my excluded QVD without just writing out where match(CourseId,...) and list out ID's?

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

In this case it needs additionally measurements, for example:

ExistsFilter: load CourseId as CourseIdExists from Exclude.qvd (qvd);

Final: load * from Final.qvd (qvd) where not exists(CourseIdExists, CourseId);

drop tables ExistsFilter;

View solution in original post

3 Replies
marcus_sommer

Maybe something like this:

ExistsFilter: load CourseId from Exclude.qvd (qvd);

Final: load * from Final.qvd (qvd) where not exists(CourseId);

drop tables ExistsFilter;

JonathanKelly
Contributor III
Contributor III
Author

That worked - however it only keeps the first instance of the non-removed courses.

I ran it using the below as you suggested and even looking into the not exists function it is the same. However, as ID must be called the same in both table it ends up not bring back all the data instead. If I reverse it to ask for where exists ID then it brings back everything however trying to reverse it doesn't. 

JonathanKelly_0-1742987029726.png

 

 

marcus_sommer

In this case it needs additionally measurements, for example:

ExistsFilter: load CourseId as CourseIdExists from Exclude.qvd (qvd);

Final: load * from Final.qvd (qvd) where not exists(CourseIdExists, CourseId);

drop tables ExistsFilter;