Feeding One Cube from Another
Things become a little more difficult when you need to write feeders for inter-cube calculation statements, such as the calculation statements in the rule for the Inventory cube that retrieve values from the Purchase cube.
As you recall, the calculation statements are relatively simple. Residing in the rule for the Inventory cube, they look like this:
['1','Quantity in Stock - Kgs']= N:DB('Purchase',!FishType,'Total Markets',!Date,'Quantity
Purchased - Kgs');['1','Purchase Cost'] = N:DB('Purchase',!FishType,'Total
Markets',!Date,'Price/Kg - USD');
The feeders for these statements are simple, but they must reside in the rule for the Purchase cube, not the Inventory cube. When working with inter-cube rules, calculation statements reside in the target cube, while feeder statements always reside in the source cube.
The following example guides you through the creation of feeder statements for the Inventory cube.