Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I compare the left column to the right column in a qlickview expression?
i need to find the number in the left column that is equal to the right column (without the leading zeroes)
Would it be possible to look at your application instead of looking at these screenshots? Makes it easier to understand what you are trying to do
LOAD
column1
column2
If(Len(Trim(column1)>0 and Len(Trim(column2)=0, 'Old',
If(Len(Trim(column1)=0 and Len(Trim(column2)>0, 'New',
If(Len(Trim(column1)>0 and Len(Trim(column2)>0, 'Both')))
FROM
....
Like this?
Data:
LOAD *, if(Column1=Column2,1,0) as EqualColumnFlag;
LOAD *,SubField(Field,' ',1) as Column1,
num(SubField(purgechar(Field,'-'),' ',2)) as Column2 Inline [
Field
1001 000001001 -
1002 000123455 -
1003 000234555 -
1004 000001004 - ];
Seems like you are using a list box with two expressions, and you want to create a list box expression and compare the list box values with the first expression.
The list box field is UIDwithZeros? And your expression is a just referencing another field or using a more complex expression?
I think your expression to compare the values might just look like
= If( UIDWithZeros = YourFirstListBoxExpression, 'Same value', 'Not same')
for example
= If( UIDWithZeros = OtherFieldName, 'Same value', 'Not same')