4 Replies Latest reply: May 8, 2017 4:06 PM by Ruytter Mendonça RSS

    How to limit a value between two numbers?

    Ruytter Mendonça

      Hi everyone!


      I've searched enough and so far, no results.

      I want a function to limit the values of an expression.


      Like so:


      If the result is greater than 1, keep 1. If the result is less than -1, keep -1. If the result is anything between these two values, keep the result.


      I cant use if function, because my expression is too large and I would've to put it on the logic test part, and repeat it on the true or false argument, and qliksense doesn't allow this much characters.


      Any thoughts?