Moving Costs to the Produce Cube

To complete the Fishcakes International model, you must now move production costs for each fishcake from the FishRequired cube to the Production cube.

Unlike the FishRequired cube, the Production cube does not include the FishType dimension; it only keeps information about fishcakes, as defined in the CakeType dimension.

Image showing the FishRequired cube and the Production cube.

Even though the cubes are of differing dimensionality, you can create a rule statement for the Production cube that calculates production costs based on the value of Total Fish Types in the FishRequired cube.

['Production Cost']=DB('FishRequired',!CakeType,'Total
Fish Types',!date,'Cost');

This statements says that for a given fishcake type on a given date, the value of Production Cost in the Production cube is equal to the value of Cost for Total Fish Types in the FishRequired cube.

In the Production cube, you also want to calculate the cost per kilogram of fishcakes produced. This is accomplished with a rule statement that divides the value of Production Cost by the value of Quantity Produced - Kgs'.

['Production Cost/Kg']=['Production Cost']\['Quantity
Produced - Kgs'];

You can now add both statements to the rule for the Production cube.

Procedure

  1. Double-click the Production rule in Server Explorer.
  2. Insert a SKIPCHECK; statement at the top of the rule.
  3. Add the rules statements immediately beneath the SKIPCHECK; statement.
  4. Click Save to save and compile the rule.