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

IF with multiples values

Hello,

I need to find a way to write an IF condition with mutliples values.

I have tried this: =IF(MATCH(VAR,1,2,3,4,5,6),'A','B') but the problem is that I have 4000 VAR entries and as a consequence it's not returning any results.

I am starting with Qlikview and wondering if there is a way I could do that?

Thanks,

Geoffroy

2 Replies
Not applicable
Author

if your multiples value in increasing order then--

try this

if(VAR>=1 AND VAR<=4000,'A','B')

OR TRY THIS

if(ROWNO()>=1 OR ROWNO()<=4000,'A','B')

Not applicable
Author

Thanks for your answers. I am sorry but I think I didn't give enough details of what I am trying to do:

Looking at this formula:

=IF(MATCH(VAR,1,2,3,4,5,6),'A','B')

VAR is corresponding to the first names of my customers.

I want to match those first names to an Excel file I have with a list of 4000 female names. Then, I want within an IF condition tells wether or not the first names are female names. Someting like:

= IF(MATCH(Firstnames, A, B, C, D, .... E), 'Female', 'Male')

Thanks for your help!