Feeding the Second Statement

The second statement in the rule for the Depletion cube pulls data from the Inventory cube.

['Available']=DB('Inventory',!FishType,!Date,!DaysOld,'Quantity
in Stock - Kgs');

The statement requires an accompanying feeder in the rule for the Inventory cube. Again, the feeder can be constructed by inverting the calculation statement to arrive at the following:

['Quantity in Stock - Kgs']=>DB('Depletion',!FishType,!Date,!DaysOld,'Available');

Follow the steps below to add this statement to the rule for the Inventory cube.

Procedure

  1. Double-click the Inventory rule in the Server Explorer.
  2. Add the feeder immediately beneath the existing feeders statements in the rule.

    The Inventory rule should now appear as follows:

    SKIPCHECK;
    ['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,'Purchase
    Cost - USD');
    ['1','Average Purchase Price/Kg']=N:['1','Purchase Cost']\['1','Quantity
    in Stock - Kgs'];C:0;
    ['Quantity in Stock - Kgs']=N:IF(DIMIX('Date',!Date)=1,0,DB('Depletion',!FishType,
    DIMNM('Date',DIMIX('Date;,!Date)-1),DIMNM('DaysOld',DIMIX('DaysOld',
    !DaysOld)-1),'Remaining'));
    FEEDERS;
    ['Quantity in Stock - Kgs']=>['Average Purchase Price/Kg'];
    ['Quantity in Stock - Kgs']=>['Purchase Cost'];
    ['Quantity in Stock - Kgs']=>DB('Depletion',!FishType,!Date,!DaysOld,'Available');
  3. Click Save to save the Inventory rule.