Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

ndeeleysww
Contributor

Using NOT IN with IF

Hello,

I've written an IF expression in Qlik Sense which evalutes a team name and uses a hard coded default:

if(Team='Asset Visualisation', YearlyTarget, if(Team='Asset Information', YearlyTarget,  if(Team='Asset Data Development', YearlyTarget,  30000)))

As you can see this is a bit inefficient, and I'd like to have a NOT IN list to evaluate rather than typing the condition again and again. I've tried various syntatx but can't get it to work. Can someone plese steer me in the right direction?

Thank you

Neil

Tags (3)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Using NOT IN with IF

=if(match(Team, 'Asset Visualisation', 'Asset......', 'Asset.....'),  YearlyTarget, 3000)

3 Replies
Partner
Partner

Re: Using NOT IN with IF

Use the Match function:

If( NOT Match(Team, 'Asset Visualisation', 'Asset Information','OTHERS','do','don't do')

Highlighted
MVP
MVP

Re: Using NOT IN with IF

=if(match(Team, 'Asset Visualisation', 'Asset......', 'Asset.....'),  YearlyTarget, 3000)

ndeeleysww
Contributor

Re: Using NOT IN with IF

Great! Thanks both for all your help!

Neil