Avg (PEL)

This function evaluates a scope and returns the average of the non-empty values of the cells in the scope. The average is computed over the measures in the scope or over a specified measure.

  [ , Numeric_Expression ] 


  • Scope_Expression
    A valid PerformancePoint Expression Language (PEL) expression that returns a scope
  • Numeric_Expression
    A valid numeric expression that is typically a PEL expression of cell coordinates that return a number.

Return Value

If a scope of empty members, or an empty scope, is specified, the Avg function returns an empty value.


The Avg function calculates the average of the nonempty values of cells in Scope_Expression by first calculating the sum of values across cells in the scope, and then dividing the calculated sum by the count of nonempty cells in the scope. If a specific measure is not specified in Numeric_Expression, the Avg function averages each measure within the current query context. If a specific measure is provided, the Avg function first evaluates the measure over the scope, and then the function calculates the average based on the specified measure.

When this function is used with a single argument, the PEL compiler can always generate SQL code. When the function is used with two arguments, the compiler cannot generate SQL code.

See Also


SQL generation for PEL functions

Other Resources

PEL reference