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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Different columns comparision

hi Community,

Can you please share any thought you have for the below requirement.

I have 2 tables,

1.

Table1:

Dim1,Dimx,Dixy,Join_key;

2.

Dim2,Column1,Colmn2,if(Dim1=Dim2,1,0) as Complex_Key,Join_key;

in the 2nd tab I have two create Complex_Key based on table1,

can you please share your thoughts.

it is not possible to have Exist function.

-Priya

Labels (1)
1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

May be like this

LOAD * From Table1;

LOAD *,

If(LookUp('Dim1','Join_Key',Join_Key,'Table1')=Dim2,1,0) as Complex_key

From Table2;

View solution in original post

4 Replies
tresB
Champion III
Champion III

You can use exist function too I guess. However, to create Complex_Key, you have to load the table for one extra time and that too after the join has already happened. In other words, first join the tables, then create the new field in another load using resident load of the joined table.

priyarane
Specialist
Specialist
Author

exist will check all the values but here it is '=', so exist cannot be used

tresB
Champion III
Champion III

If you want to just create a flag, then exist() won't help. Exist() could help you if you want to discard few values being loaded.

antoniotiman
Master III
Master III

May be like this

LOAD * From Table1;

LOAD *,

If(LookUp('Dim1','Join_Key',Join_Key,'Table1')=Dim2,1,0) as Complex_key

From Table2;