1 Reply Latest reply: Jun 9, 2014 7:17 AM by Jonathan Dienst RSS

    sum in load script

    Rhona Corcoran



      I am still struggling with this.


      I have the following two metrics in the Load script.  IT is brining back the two metrics as Discharges which is fine but it brings them back seperately.  I also need to bring them back added together so I wan Metric Key 3 and Metric Key 5 values added together as sum of discharges which can then be brought into a report.  Any help would be great





      ((TLMKey=18 and SLMKey=142 and MetricKey=3) or (TLMKey=18 and SLMKey=142 and MetricKey=5),MetricKey) as Discharges,

        • Re: sum in load script
          Jonathan Dienst



          You need something like (in an expression)


               =Sum({<TLMKey = {18}, SLMKey = {142}, MetricKey = {3, 5}>} Value)


          where Value is the field containing the actual metric value.


          If you want to do this in script:


               If(TLMKey = 18 And SLMKey = 142 And Match(MetricKey, 3, 5), Value)) As Discharges