3 Replies Latest reply: Dec 2, 2010 9:28 AM by Alberto Gugel RSS

    Adding guage results together {how??}

      Hi,

       

      I want to do the following:

      Gauge 1 has a result; Gauge 2 has a result.

      I want to make a third gauge which basicly does: (GAUGE1.Result + GAUGE2.Result) /2

      Is this possible? Or is the only way out programming the gauges in Variables?

       

      Thanks for your feedback!

       

       

        • Adding guage results together {how??}
          renjith pl

          I think, you can just add both expression you gave in Gauge1 and Gauge2.

          (Gauge1expression + Gauge2 expression)/2 will give you the answer if i am not misunderstood your question.

          regards

          • Adding guage results together {how??}
            Alberto Gugel

            Hi markvandermeij, I can probably help you, even if the solution I'm suggesting you isn't that practical. You'll see.

            Let say you need three expressions, one for Gauge1, one for Gauge2 and the last one to represent the average in Gauge3.

            In this situation I would set three variables at the end of the script:

            SET Expr1 = "sum({$<myField1 = {'myValue1'}>}Value)";

            SET Expr2 = "sum({$<myField2 = {'myValue2'}>}Value)";

            SET AvgExp = "rangeavg($(Expr1),$(Expr2))"

            or, if you prefer:

            SET AvgExpr = (($(Expr1))+($(Expr2))) / 2

            Then, you'll need to refer to these variables when defining your three gauges using again the so called dollar expansion.

            Hope it's all clear.