6 Replies Latest reply: Dec 9, 2016 8:31 AM by Jasper Bom RSS

    Multiple IF statements in expression

      Hi

      Can any one tell me how to use multiple 'if' statements (not nested,separate 'if' statements)in expressions?

      I need have a condition where more than one possible outcomes is possible.

       

      E.g.

       

      HeatMap_Rules_Key

      Condition

      MinValue

      MaxValue

      Color

      1

      Between

      0

                  25

      Red

      2

      Between

      25

                  50

      Blue

      3

      Between

      50

      100

      Green

      4

      Between

      100

      125

      Orange

       

      This is the lookup table and the Coloumn can have any values. I need to set the Color for the column based on the value range in this table

       

      consider the

      column1

      -------------

      .747

      .968

      .45

      .50

       

      I need to be able to do use both

       

      IF(Condition1 = 'Between',

                IF(column1<ULimit1 and column1>= LLimit1,$(ColourCode1))

      )

       

      IF(Condition1 = 'Between',

                IF(column1<ULimit2 and column1>= LLimit2,$(ColourCode2))

      )

       

       

      The values of the variables are

      ULimit1 = 25

      ULimit2 = 50

      LLimit1 = 0

      Limit2 = 25

      $(ColourCode1) = RGB(255,0,0)

      $(ColourCode2) = RGB(0,255,0)