2 Replies Latest reply on Jun 29, 2016 7:58 AM by Shinichiro Murakami

    IF and ELSE statement

    Amrit bhagat

      Suppose I want to create a metric 'XYZ' which is to be used as a dimension based on some common key A. I am writing the statement:


      if A='1' or A='2'

      then 'X'

      elseif A='1' or A='3'

      then 'Y'

      elseif A='2' or A='4'

      then 'Z'



      This statement is computing X for both A=1 and A=2. It is computing A=3 for Y but A=1 is not being computed.

      For Z, only A=4 is getting computed.


      Therefore, I want to perform an action where my X, Y and Z are calculated for their assigned values of A.

      Please suggest some method which can be used.