3 Replies Latest reply: Sep 11, 2017 7:14 AM by Shraddha Gajare RSS

    Error with the result of IF() used in script.

    Rajesh Thakur

      Hi Guys,

      I am using an if statement in statement which shows the wrong result.

      The if statement that i have used is as follows -

      if(x<z or y<z,'x or y< z',

      if(x>z or y>z,'x or y> z','x or y = z')) as "xyzpap".

      But when i use it to create a pie-chart -

      1) "xyzpap" as Dimension

      2) Sum(values).

      It gives wrong values for 'x or y<z', 'x or y >z' and 'x or y = z'.

      How  do i tweak the expression to get the correct result?