Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Ameya09
Partner - Contributor III
Partner - Contributor III

Nested if issue

Hi all,

I am using nested if to display 2 conditions as a single field

if(LEGAL_CUST='Y' or LEGAL_TRX='Y','Legal',
if(DISPUTE_CUST='Y' OR DISPUTE_TRX='Y','Dispute')) as Category

Issue is only Legal is visible in Category and Dispute is not showing up.
I tried displaying Dispute seperately and it shows up in front end.
However it does not show up in nested if.
How to resolve this?

1 Reply
QFabian
Specialist III
Specialist III

Hi @Ameya09 , maybe something like this? to avoid undefined ways

 

if(
(LEGAL_CUST = 'Y' or LEGAL_TRX = 'Y')   and (DISPUTE_CUST = 'Y' OR DISPUTE_TRX = 'Y'),
'Legal'
,
if(
(DISPUTE_CUST = 'Y' OR DISPUTE_TRX = 'Y') and (LEGAL_CUST = 'Y' or LEGAL_TRX = 'Y'))
'Dispute')
) as Category

QFabian