Differentiating base and consolidated levels

A problem that typically arises with writing rules is in forcing the order in which cube rules and dimension consolidations calculate.

Example

You define the simple rule ['Sales'] = ['Price']*['Units'].

In addition, you define a consolidation in the Regions dimension stating that Central Europe is the sum of Germany and France.

Due to the way in which OLAP Server calculates values, you must force the order of calculation. Otherwise, these two rules will calculate in conjunction with each other in this way:

['Sales', 'Central Europe']= (['Units','Germany']+['Units','France'])*(['Price','Germany']+['Price','France'])

That is, the cube rule is calculated after the consolidation. What is required is to calculate Sales independently for France and Germany and to add these two numbers to arrive at Sales for Central Europe. Mathematically:

['Sales', 'Central Europe']= (['Units','Germany']*['Price','Germany'])+(['Units','France']*['Price','France'])

But, to force the order of calculation using parentheses in this way, would require a rule for every consolidated element in every dimension of the cube.

OLAP Server has a solution for this problem. In the Affected cells section of the Edit Cube Rule dialog you select the type of cells (base, consolidated or all cells) for your rule.