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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Nested if

Hi Qlik Experts I have a problem.

I'm trying to optimize an IF statement that I have in a Load. This is my IF expression:

If(Adt>0 and Adt <200,'E',

  If(Adt>=200 and Adt <500,'D',

  If(Adt>=500 and Adt <1200,'C',

  If(Adt>=1200 and Adt <2700,'B',

  If(Adt>=2700 and Adt <100000,'A'))))) as Segment

Any suggestion?

Thanks!!!

13 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Any idea whether this one perfoms better/is faster than the typical nested IF from the Original Post?

MarcoWedel

No, I didn't test the performance, so using a string operation it might even be slower ...

Anonymous
Not applicable
Author

Thanks a lot Marco!!

I tried all the different options and this was the option with the best performance.

MarcoWedel

Glad it helped

thanks for your feedback.

regards

Marco