1 Reply Latest reply: Nov 19, 2012 2:07 AM by AlexAnd RSS

    avg function in xml report

    883038
      Hi all I have developed a matrix xml report which is giving out put as below .
      deptno      edp         account
      10            5000        25000
      20            20000      130000
      30            35000       160000
      ------------------------------------------------ 
               (avg) value       avg value)
      how to get this average value of edp dept and average value of account dept?

      I developed the report but I was strucked in to get average value .



      Kindly help me
      thanks for all in advance.
        • 1. Re: avg function in xml report
          AlexAnd
          look at
          https://blogs.oracle.com/xmlpublisher/entry/averaging_your_totals

          or try
          <?avg(//edp)?>
          -add
          or by formula
          <?for-each-group: ROW;’Q’?>
          <?sum(current-group()/edp) div count(current-group()/edp)?>
          <?end for-each-group?>
          output: 20000

          Edited by: AlexAnd on Nov 19, 2012 12:06 AM