General cube rule syntax

Cube rules have the general syntax:

(Target)=fx(Source)

That is, target is a function of source.

In this example, the left-hand portion of the rule is the target and the right-hand portion the source:

['Price','Brazil']=['Sales']/['Units']*1000

To define an area in the cube rules syntax, you must specify an element or a subset for each dimension which you want to limit. If you want to include all elements from a dimension, do not specify any single elements from that dimension.

The whole area must be enclosed in square brackets. Subsets are enclosed in double braces. These are some examples of data areas of a six-dimensional cube containing the dimensions Actvsbud, Years, Products, Regions, Measures and Months:

['Sales']
['Sales','Argentina']
['Sales','Argentina','2006']
[Products:{{TotalServers}}] 
		

The order in which you specify the elements within an area is irrelevant, except where the source area is located in a different cube from the one for which you are writing the rule. In these cases, a special syntax is used.

SeeWriting rules to external cubes.