Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QV users,
i'am writing an expression like the following, but it not works:
If([field1]='not null', If([field2]=030357,'output1','output2')
My goals is to create a new field that show me:
a) output1, if field1 is not null and field2 = 030357
b) output2, if field1 is not null and field2 <> 030357
Is there something wrong?
Thanks,
Mattia
May be this
If(Len(Trim([field1])) > 0,
If([field2] = '030357', 'output1', 'output2')
)
can u share the rawdata?
Sorry Frank, i can't do this now.
Can you help me anyway?
Thanks,
Mattia
Hi Mattia,
Please give this one a try:
IF(NOT IsNull([field1]) AND [field2]=030357, 'output1',
IF(NOT IsNull([field1]) AND [field2]<>030357, 'output2', 'output3') )as Output
There needs to be a third output there though. Because there are more than just those 2 options in your equation -> ex: When [field1] is Null
I hope that helps!
Regards,
S.T.
Hi Stoyan!
is it possible to have an expression that shows only two options?
Thanks,
Mattia
May be this
If(Len(Trim([field1])) > 0,
If([field2] = '030357', 'output1', 'output2')
)
Thanks Sunny!
It works perfectly!!!
Mattia