Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhas277
Creator
Creator

Question on Operation

Hi All,

Individually i wrote below expression it gives result. while i used AND or OR Operations it won't give result just it throws null value 

= if(state ='HYD',
if(category='Apple','AAA',
if(category='Mango','MMM',)))
OR
= if(state ='BANG',
if(category='Apple','CCC',
if(category='Mango','DDD,)))

Please help out me where i am wrong.

Thanks

Srinu

 

2 Replies
tresesco
MVP
MVP

Of course it would give you null. Your first conditional expression produces - 'AAA' or 'MMM' or null based on your data, and second expression gives similarly - 'CCC' or 'DDD' or null. That means after combining (I am assuming that you are putting them correctly to avoid any syntax error), your expression evaluation becomes something like:

<a text/ null> OR/AND <a text/ null> 

And this will of course result in null.

Instead, you would probably need something like:

= if(state ='HYD',
if(category='Apple','AAA',
if(category='Mango','MMM', if(state ='BANG',
if(category='Apple','CCC',
if(category='Mango','DDD))) )))

prabhas277
Creator
Creator
Author

CCC and DDD data not showing