Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing two values in two tables

Hi All,

I am fairly new to Qlikview. I have come across a problem.

I have loaded the names of places from an excel sheet in the script. in the next table, i would like to check if a column name present in this tables has values same as the names imported earlier. if it does, i would want to set a flag as yes else as no

It would be something like this

LOAD Name

FROM

(ooxml, embedded labels, table is Sheet1);

Doc1:

LOAD

user as User1 ,

if( user=name,yes,no) as flag

FROM

(ooxml, embedded labels, table is Sheet1);

I need help in framing the if statement for this

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You should use the exists function. like below.

LOAD Name

FROM

(ooxml, embedded labels, table is Sheet1);

Doc1:

LOAD

user as User1 ,

if(Exists( user,Name),'yes','no') as flag

FROM

(ooxml, embedded labels, table is Sheet1);

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

i tried this. However there was an error which said Name is not found..

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

use the same field name as it is in your source, because qlik is case sensitive.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Not applicable
Author

Hi ,

I have used the same upper case in both the instances. However there is still an error which says Name not found

saimahasan
Partner - Creator III
Partner - Creator III

You can join the two tables and then put the if condition as

if(User=Name,'yes','no')

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Is it possible for you to share the data with us.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!