Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

please help me with the if statement.

How can I put these 2 if statements in 1 if statement.

  if(match(CATEGORY,'4','9','16','21','22')=0,'Trust_Non-Reccuring','Trust_Reccuring') as FEETYPE

  if(ActualAccount <>0,'Trust Reccuring') as FEETYPE

Thanks in advance.

3 Replies
Not applicable
Author

Like this?

if(match(CATEGORY,'4','9','16','21','22')=0,'Trust_Non-Reccuring',if(ActualAccount <>0,'Trust Reccuring') ) as FEETYPE

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

What's the value supposed to be if CATEGORY=4 and ActualAccount=0?

-Rob

maxgro
MVP
MVP

not fully understand the logic of your inquiry, however you can combine and, or, and nested if, for example,

=

if(match(CATEGORY,'4','9','16','21','22')=0 or ActualAccount=0, 'Trust_Non-Reccuring',

if(match(CATEGORY,'4','9','16','21','22')=1 or ActualAccount <>0, 'Trust_Reccuring',

'???'))