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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where exist function for excel data

Hi,

I have a problem with the "exist" function. My data are in the excel files and I want to use where exist clause in order to eliminate some of the lines in Table B which are not matching with the table A. I wrote a script as below.

A:

LOAD

     person_id,

     person_id as PersonId,

     person_name

FROM

(ooxml, embedded labels, table is Sheet1);

B:

LOAD

     id as person_id,

     country

     FROM

(ooxml, embedded labels, table is Sheet1)  where Exists(person_id) ;

I am glad if you correct my script.

Thanks

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The solution provided by Ioannis will work and do exactly what you want. But there is an alternative way to do this, that often is faster:

A:

LOAD

     person_id,

     person_id as PersonId,

     person_name

     FROM (ooxml, embedded labels, table is Sheet1);

B:

Left Keep (A)

LOAD

     id as person_id,

     country

     FROM (ooxml, embedded labels, table is Sheet1) ;

HIC

View solution in original post

2 Replies
giakoum
Partner - Master II
Partner - Master II

A:

LOAD

     person_id,

     person_id as PersonId,

     person_name

FROM

(ooxml, embedded labels, table is Sheet1);

B:

load

     person_id,

     country

where Exists(person_id) ;

LOAD

     id as person_id,

     country

     FROM

(ooxml, embedded labels, table is Sheet1) ;

hic
Former Employee
Former Employee

The solution provided by Ioannis will work and do exactly what you want. But there is an alternative way to do this, that often is faster:

A:

LOAD

     person_id,

     person_id as PersonId,

     person_name

     FROM (ooxml, embedded labels, table is Sheet1);

B:

Left Keep (A)

LOAD

     id as person_id,

     country

     FROM (ooxml, embedded labels, table is Sheet1) ;

HIC