Calculation Contexts in Business Objects

Calculation Contexts gives more control over how a formula or measure is evaluated. let’s take an example, a report could show sales revenue (measure) by year (dimension), where revenue is dependend on year(dimension). This means that the figures returned by a measure depend on the dimension with which it is assocaited; in other words, on the context in which it is placed.

Now, If you then add the quarter dimension to the block, the figures in the sales revenue column changes because the default context is now year and quarter.

You can see that when you place a measure or formula in a block, the default calculation context that business objects applies includes all the dimension in the block.

Extended syntax: To use extended syntax you need to be familiar with three (3) concepts:

1. Input and Outpur contexts

2. Context Operatos

3. Extended syntax keywords

Input and output contexts List of dimensions that the formula takes into account when calculating its result. In above example

a. BusinessObjects sums Sales Revenue by year. The input context of the left block is (Year);

b. BusinessObjects sums Sales Revenue by Year and Quarter the input context of the right block is (Year,Quarter).

Output context A formula’s output context causes it to output a value is if it were placed in the footer of a block break (or, in SQL terms, the COMPUTE BY clause of an SQL query). What if you want to show the minimum revenue by year in a column in the block that has no break? In this case, you need to tell BusinessObjects that the formula’s output context is (Year).

Expressed in words, you are telling BusinessObjects to sum revenues by year and quarter (the input context), then output the smallest of these values that occurs in each year (the output context). The formula for the Min by Year column is Min(<Sales revenue> In (<Year> ,<Quarter>)) In <Year>.


source: Business Objects Advance Query building guide.

Leave a Reply