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

Urgent Comparison between a particular field in 2 tables

I have 2 bases:

Users 1

Users 2

Comparison between a particular field (id_user) between the two tables.

In this comparison create a new field in LOAD saying YES or NO is active.

For the Users table 2 is a real data table, and the table 1 is compared with the previous month.

I want to validate a table with YES or NO field.

Can you help me?

17 Replies
robert_mika
Master III
Master III

Could you post your data/app to better understand your requirement?

Not applicable
Author

Tbl.User1:

LOAD *;

SQL SELECT * FROM dbo.User1;

Tbl.User2:

LOAD *;

SQL SELECT * FROM dbo.User2;

Validation1:

LOAD ID_User,

  if((ID_User)='','No','Yes') as [Active?];

SQL SELECT * FROM dbo.User2;

ValidationON:

INNER Join (Tbl.User1)

LOAD *,

  If(Len(ID_User) = 0 OR IsNull(ID_User), 'Yes', 'No') as [Update?];

SQL SELECT NT_User FROM dbo.User2;

Not applicable
Author

Can help me please?

oknotsen
Master III
Master III

When trying to read your code, it seems like you have already answered your own question.

Since you are still expecting a reply, my guess is this is not the case.

So....

Can you please do your absolute best in explaining what you are trying to achieve?

Maybe also post some demo data, like how your sources are currently looking and what you expect to see afterwards.

May you live in interesting times!
Agis-Kalogiannis
Employee
Employee

An example would be useful in your case if you really need an answer.

Spend some time, create a couple of snapshots, explain what you're trying to achieve and you might get an answer then.

Thanks

Not applicable
Author

Hello Agis Kalogiannis,

Comparison between two tables. Since there is a key field, if the value is different (does not exist in other tablea) it should return as disabled user, if it is true as active.

Tbl.User1:

LOAD *;

SQL SELECT * FROM dbo.User1;

Tbl.User2:

LOAD *;

SQL SELECT * FROM dbo.User2;

Did I could explain it better?

Not applicable
Author

Hi there trying to understand what you are wanting. Are you trying to load all users from User1 and then trying to see if these exist in User table 2 ?

Not applicable
Author

Yes.

Yes.... and create a new field with (Yes or No).

Example..

expression blablabla  as [Active?]

maxgro
MVP
MVP

hope to understand your question

user1:

load * inline [

id_user, name1

1, a

2, b

3, c

];

tmp:

load distinct id_user as id_user_exists Resident user1;

user2:

load *,

if(Exists(id_user_exists, id_user), 'yes', 'no') as user2existsinuser1

inline [

id_user, name2

1, a

2, b

3, c

4, d

];

DROP Table tmp;