Professional Documents
Culture Documents
Aggregate Aware is one of the powerful functions in BO and very common / famous function in Business Objects
Designer and reports. It will speeds up the execution of queries, improving the performance of SQL transactions using
database Aggregate Tables.
Note: When you have Daily & Monthly tables with same set of columns, you can use @aggregate_aware function
and create a single object for both and it will reduce your universe support and maintenance cost. Its not necessary
to have only aggregate tables. It will be used for either Measure or dimension objects.
@Aggregate_aware(sum(MonthlyTable.measure),sum(DailyTable.measure))
@Aggregate_aware(MonthlyTable.dimesion,DailyTable.Dimension)
How aggregate Awareness helping to improve your report performance and process to follow for getting the benefits in
your reports.
Universe Structure without Aggregate tables:
Example, we have 5 Dimension tables and one fact table which holds complete data transactional data in data
warehouse. Based on the dimension in your report to get the data is really huge load to that fact table and the report
wont finish as you expected. Fact table hold the data for Daily transaction for each, customer, Product and branch
and this can be expressed as follows.
365 Days X 5 Products X 2 Country X 100 Customer = 365000 Rows
Below is the Sample Data set for the Fact table.
When you create reports for Daily / Monthly / Quarterly / yearly from this fact table along with some dimension, your
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
1/8
5/30/2014
report will read complete table data sets and database engine must add up a large number of rows.
Below is the universe structure for Fact and Dimension model of your current data model.
To avoid the complexity of complete table scan/read/execution, we can create summarized tables for Monthly,
Quarterly and Yearly in your database from the Fact table. Summarized tables will have calculated data for that
particular time periods and your report will read only that particular table to get the data.
Universe Structure with Aggregate tables:
Summary (Aggregated Tables) tables created in Database level and those are physically stored the data in pre
calculated manner. Keeping these aggregated tables in BO universe designer you can created an aggregated aware
objects using @Aggregate_aware function. Aggregate Awareness function will decide which table to choose on the
fly based on your time Period (daily, Monthly, Quarterly & Yearly) selection to query the data from either one of your
aggregated tables.
Below is the universe structure with aggregated tables.
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
2/8
5/30/2014
Each aggregated tables will have join with other dimensions tables and along with Time Dim data Sets (see below) by
Month, Quarter and Year.
Below is the detailed schema how the aggregated tables are joined with Time Dimension.
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
3/8
5/30/2014
Once you created joins between the aggregated tables with other dimensions tables, you have to create the
Aggregate Objects and need to define the compatible & incompatible objects for those aggregated tables.
Create Aggregate Objects
Before creating the aggregate objects, level of aggregation should be identified and as follows:
YearSalesFact.Revenue is the highest level of aggregation.
QuarterSalesFact.Revenue is the next level.
MonthSalesFact.Revenue is the next level.
SalesFact.Revenue is the lowest level of aggregation.
Define the @Aggregate_aware function object as mentioned below.
@Aggregate_Aware(sum(agg_table_1), sum(agg_table_n)) > agg_table_1 is the aggregate with the highest
level of aggregation, and agg_table_n the aggregate with the lowest level.
Object Name: Sales Revenue
Select : @Aggregate_Aware(sum(YearSalesFact.Revenue), sum(QuarterSalesFact.Revenue),
Sum(MonthSalesFact.Revenue), sum(SalesFact.Revenue ))
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
4/8
5/30/2014
An object is either compatible or incompatible with respect to the Aggregate table. The rules for compatibility as
follows:
When an object is at the same or higher level of aggregation as the table, it is compatible with the table.
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
5/8
5/30/2014
When an object is at a lower level of aggregation than the table (or if it is not at all related to the table), it is
incompatible with the table.
As per above example, below is the details of in-compatible objects.
Year Object is in-compatible for Day, Week, Month & Quarter (Since Year is having highest level of aggregated data)
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
6/8
5/30/2014
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
7/8
5/30/2014
SQL generation will change based on the Time Period object you select in the Query. You can see huge
performance changes when use Aggregate Aware function in your report.
http://dwbicastle.com/2014/01/22/aggregate-awareness-in-bo-aggreagte_aware-in-bo-designer/
8/8