Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression to compare to fields in a table

Hello,

I have a table with two fields ID1, ID2.

I’m looking for an expression to find all entries where ID1 <> ID2.

In the following inline, I would like to ‘earmark’ rows 3,17.

t:
load
RowNo() as RowId,
*
;
LOAD * INLINE [
ID1, ID2
1, 1
2, 2
3, 2
4, 4
5, 5
6, 6
7, 17
8, 8
9, 9
]
;

Thanks,

Shaul

12 Replies
Not applicable
Author

Thanks!

preminqlik
Specialist II
Specialist II

hi there,

use this expression in chart !

only({<ID1={'=ID1<>ID2'}>}ID2)

find the attachment

Not applicable
Author

Quick follow up to this...what if the fields were in 2 different tables?  What is an expression that would return any value in either table/field that is not a value in the the first table/field?

In other words, just list every value that is in one field but not in the other field...for both fields.

(not using a load script as this could be done there with where not exists)

Looking for an expression.

Thanks.