Friday, December 7, 2007

OBIEE EVALUATE_AGGR Function

In the documentation for OBIEE 10.3.3.1 you find a very small description of the EVALUATE_AGGR function:

6.2 EVALUATE_AGGR Function
This function is intended for aggregate functions
with group by clause.
Syntax: EVALUATE_AGGR('DB_Aggregate_Function(%1)',
{comma separated Expression})
Example: SELECT year.year, sales.qtysold, EVALUATE_AGGR('sum(%1)', sales.quantity) From SnowFlakeSales;


This function is very useful if you want to use the build in statistics functions from the ORACLE database like:

  • CORR
  • COVAR_POP
  • STDDEV_POP

The following example calculates the coefficient of correlation between the list prices and minimum prices of products by weight class in the sample view oe.products:SELECT weight_class, EVALUATE_AGGR('CORR(%1,%2)' as double, product_information.list_price, product_information.min_price)
FROM product_information;

If you get a "[38083] The Attribute defines a measure using an obsolete method." error, check whether you set the Aggregation Rule of the logical column correctly.

Good info can also be found here:

http://www.oracle.com/technology/products/bi/pdf/Oracle%20Business%20Intelligence%20Server%20and%20Embedded%20DB%20Functions.pdf


No comments: