Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

Need help in qlik syntax

Hi Team,

Please help me to covert the below expression..

case WHEN FIELD1 IN (A) AND FIELD2 IN ('M') AND FIELD3 IN ('OTH') AND FIELD4 IN ('014') AND FIELD5 IN ('M')

                                                                               

THEN 'MATCH'

           WHEN FIELD1 IN (A) AND FIELD2 IN ('M') AND FIELD3 IN ('OTH') AND FIELD4 IN ('014') AND FIELD5 IN ('-')

                                                                               

THEN 'UNKNOWN'

            WHEN FIELD1 IN (A) AND FIELD2 IN ('H') AND FIELD3 IN ('OTH') AND FIELD4 IN ('015') AND FIELD5 IN ('H')

                                                               

THEN 'MATCH'

          WHEN FIELD1 IN (A) AND FIELD2 IN ('H') AND FIELD3 IN ('OTH') AND FIELD4 IN ('015') AND FIELD5 IN ('-')

                                                               

THEN 'UNKNOWN'

                                               

              WHEN FIELD1 IN (A) AND FIELD2 IN ('S') AND FIELD3 IN ('OTH') AND FIELD4 IN ('016') AND FIELD5 IN ('S')

                                                               

THEN 'MATCH'

               WHEN FIELD1 IN (A) AND FIELD2 IN ('S') AND FIELD3 IN ('OTH') AND FIELD4 IN ('016') AND FIELD5 IN ('-')

                                                               

THEN 'UNKNOWN'

                                               

                   ELSE 'NO'

                   END AS MATCH

                  

Thanks,

Chinnu.

2 Replies
Clever_Anjos
Employee
Employee

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'M') and Match(FIELD3,'OTH') AND Match(FIELD4,'014') AND Match(FIELD5,'M'), 'MATCH',

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'M') and Match(FIELD3,'OTH') AND Match(FIELD4,'014') AND Match(FIELD5,'-'),'UNKNOWN',

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'M') and Match(FIELD3,'OTH') AND Match(FIELD4,'015') AND Match(FIELD5,'H'),'MATCH',

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'M') and Match(FIELD3,'OTH') AND Match(FIELD4,'015') AND Match(FIELD5,'-'),'UNKNOWN',

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'S') and Match(FIELD3,'OTH') AND Match(FIELD4,'016') AND Match(FIELD5,'S'),'MATCH',

If(

     Match(FIELD1,'A') AND Match(FIELD2 ,'S') and Match(FIELD3,'OTH') AND Match(FIELD4,'016') AND Match(FIELD5,'-'),'UNKNOWN','NO')

))))) AS MATCH


prma7799
Master III
Master III

Try like this

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'M') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'014') and WildMatch(FIELD5,'M')) , 'Match',

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'M') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'014') and WildMatch(FIELD5,'-')) , 'UNKNOWN',

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'H') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'015') and WildMatch(FIELD5,'H')) , 'Match',

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'H') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'015') and WildMatch(FIELD5,'-')) , 'UNKNOWN',

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'S') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'016') and WildMatch(FIELD5,'S')) , 'Match',

if((WildMatch(FIELD1,'A') and WildMatch(FIELD2,'S') and WildMatch(FIELD3,'OTH') and WildMatch(FIELD4,'016') and WildMatch(FIELD5,'-')) , 'UNKNOWN' ,

'No' )))))) as MATCH

If you are not getting desire output please share sample data with sample app