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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement with data range

I am wondering if it is possible to have this type of if statement:

if (field_b between 0 and 100 than field_d = A), else if (field_b between 101 and 1000 than field_d = B), else if etc.

Can I do it in qlikview?

Many thanks in advance

Labels (1)
1 Reply
MayilVahanan
MVP
MVP

Hi

Try like this

Load *, if(field_b >= and field_b <= 100, 'A', if(field_b >=101 and field_b <= 1000,'B','C')) as field_d from tablename;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.