Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
qwebnm
Partner - Creator III
Partner - Creator III

How to use QlikSense if statement

I want to make a statement so that if the value of column 1 is 1 to 3, column 2 will return 2, and if the value of column 1 is 7, then column 2 will return 1.

What should I do?
I'm not good at nesting QlikSense if statements.

please help me.

Thanks you!

Labels (3)
3 Replies
Saurabh_K14999
Contributor III
Contributor III

Hi,

Try the below expression:

If(Value=7,'1',If(Value>=1 and Value<=3,'2','NA'))

Replace 'Value, with your column 1 name.

Regards, 

SK

hic
Former Employee
Former Employee

Column1,
If(1<=Column1 and Column1<=3, 2,
If(Column1=7, 1,
'other value')) as Column2,
Column3,
...

MayilVahanan

Hi

Try like below

Load *,

If(Match(Column1, 1,2,3), 2, 
If(Column1=7, 1,
'other value')) as Column2
from ursource;

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