Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
hi there,
use this expression in chart !
only({<ID1={'=ID1<>ID2'}>}ID2)
find the attachment
Hi,
Try like this
t:
load
RowNo() as RowId,
*,
If(ID1 <> ID2, 1, 0) AS Flag
;
LOAD * INLINE [
ID1, ID2
1, 1
2, 2
3, 2
4, 4
5, 5
6, 6
7, 17
8, 8
9, 9
];
Now in set analysis you can use flag field to find count() or sum().
=Count({<Flag={1}>} ID1)
Hope this helps you.
Regards,
Jagan.
Hi
To filter:
t:
load
RowNo() as RowId,
*
where ID1 <> ID2
;
LOAD * INLINE [
ID1, ID2
1, 1
2, 2
3, 2
4, 4
5, 5
6, 6
7, 17
8, 8
9, 9
];
To flag matches/mismatches:
t:
load
RowNo() as RowId,
*,
If(ID1 = ID2, 1, 0) As MatchFlag
;
LOAD * INLINE [
ID1, ID2
1, 1
2, 2
3, 2
4, 4
5, 5
6, 6
7, 17
8, 8
9, 9
];
HTH
Jonathan
Hi,
Try this ways
load
RowNo() as RowId,
if(ID1=ID2,'Match Record','UnMatch Record') as IdDetails, //For Finding flag (Match and MisMatch)
if(ID1=ID2,1 , 0 ) as Flag //For SET analysis calculation
*;
LOAD * INLINE [
ID1, ID2
1, 1
2, 2
3, 2
4, 4
5, 5
6, 6
7, 17
8, 8
9, 9
];
Regards
Anand
Thanks for the tip Jonathan. What I am looking for is a Chart/Expression solution as opposed to a Scripting one. I was wondering if it is doable to compare two columns in a QV chart. Thanks! Shaul
Thanks for the tip Anand. What I am looking for is a Chart/Expression solution as opposed to a Scripting one. I was wondering if it is doable to compare two columns in a QV chart. Thanks! Shaul
Thanks for the tip Jagan. What I am looking for is a Chart/Expression solution as opposed to a Scripting one. I was wondering if it is doable to compare two columns in a QV chart. Thanks! Shaul
try
where not exists(ID1,ID2)
ahhhh.
then in the chart write an expresson like this
=IF(ID1<>ID2, whateveryouwant2returniftheymatch)
notice that I didn't include else.
Wouldn't that just be an expression:
ID1 <> ID2
Or is it more complex than that?
-Rob