Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
We value your feedback – take our 5-minute QlikView modernization survey
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegauntlett
Contributor III
Contributor III

Nested IF Statement with >= and <= conditions

Hi

So I created a master measure which subtracts one date from the other and called it CCDSHIP

Now i want a method of being able to say if CCDSHIP = this do that if not do this etc.

So i am exploring a nested IF

Current

=IF(CCDSHIP>60,0.2,(IF(CCDSHIP >=30 <=60,0.1,(IF(CCDSHIP <30,0,0)))))

This however cause a error in expression.

I single IF statement works

=IF(CCDSHIP >=30,0.2,0)

So not sure if it is my Nested IF that is wrong or the multiple conditions in the second IF

there are three conditions

>= 60 =0.2

>=30 and <= 0.1

<=30 = 0

Any advice would be greatly appreciated 

1 Solution

Accepted Solutions
zhadrakas
Specialist II
Specialist II

Change it to:

=IF(CCDSHIP>60,0.2,(IF(CCDSHIP >=30 AND CCDSHIP<=60,0.1,(IF(CCDSHIP <30,0,0)))))

this should work

regards

tim

View solution in original post

1 Reply
zhadrakas
Specialist II
Specialist II

Change it to:

=IF(CCDSHIP>60,0.2,(IF(CCDSHIP >=30 AND CCDSHIP<=60,0.1,(IF(CCDSHIP <30,0,0)))))

this should work

regards

tim