Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report
Highlighted
zied_ahmed1
Valued Contributor

condition with 3 Fields

Hello, I have 3 fields field1 field 2 and field3

I want when :

1/ field 1 > field 2  field3 i display 1

2/ Field2> Field 1 >Field3 I display 2

3/Field3> Field2 >Field1   I display 3

If we have just 2 Fields we will do : if (Field1>Field2,1,2)

Regards

3 Replies
Highlighted
laddu_927
Valued Contributor

Re: condition with 3 Fields

if (Field1>Field2 and Field2>Field3,1,(if(field2>field1 and Field1>field3,2,(IF(Field3>Field2 and Field2>field1,3)))))??

Highlighted
zied_ahmed1
Valued Contributor

Re: condition with 3 Fields

Just we Need 1>2 and 1>3 etc...

Highlighted
laddu_927
Valued Contributor

Re: condition with 3 Fields

Didnt get you Zied.

You can change the condition to

if (Field1>Field2 and Field1>Field3,1,(if(field2>field1 and field2>field3,2,(IF(Field3>Field2 and Field3>field1,3))))).


But both are same. Transtive property