2 Replies Latest reply: Dec 28, 2010 9:29 PM by John Witherspoon RSS

    Conditional: numeric values problems!

      Hi,

       

      On one hand,

      I'm trying to use a simple IF sentence but I've some problems because I want to compare the value result of an operation with a decimal number:


      if (
      (Sum (service_availability_hourly.seconds_ok)/(Sum (service_availability_hourly.seconds_ok)+Sum (service_availability_hourly.seconds_not_ok)))>"1.01",
      'qmem://<bundled>/BuiltIn/arrow_ne_g.png',

      if (
      (Sum (service_availability_hourly.seconds_ok)/(Sum (service_availability_hourly.seconds_ok)+Sum (service_availability_hourly.seconds_not_ok)))<"0.99",
      'qmem://<bundled>/BuiltIn/arrow_se_r.png')
      )

       

      How could I compare the exprsion with numbers?

       

      On the other hand,

      I've calculated the expressions before in a different column of the same table. Should I recalculate the values again in the IF condition or could I take advantadge of the previous calculation. How could I do it?

       

      Thank you!