Clearing and Copying Data
You can clear a subset of data from a database and copy data values from one set of members to another set of members.
Clearing Data
The following commands clear data:
Table 24-5 List of Commands for Clearing Data
Command | Calculation |
---|---|
CLEARDATA |
Change the values of the cells you specify to #MISSING; the data blocks are not removed. Use the FIX command with the CLEARDATA command to clear a subset of a database. |
CLEARBLOCK |
Remove the entire contents of a block, including all the dense dimension members. Essbase removes the entire block, unless CLEARBLOCK is inside a FIX command on members within the block. |
CLEARBLOCK UPPER |
Remove consolidated level blocks. |
CLEARBLOCK NONINPUT |
Remove blocks containing derived values. Applies to blocks that are completely created by a calculation operation, not to blocks into which any values were loaded. |
CLEARBLOCK EMPTY |
Remove empty blocks. |
The following calculation script command yields different results depending on whether the Scenario dimension is dense or sparse:
FIX(Actual)
CLEARBLOCK NONINPUT;
ENDFIX
-
Dense: The command removes all data cells that do not contain input data values and that intersect with the member Actual from the Scenario dimension.
-
Sparse: The command removes only the blocks whose Scenario dimension member is Actual.
The following formula clears all the Actual data values for Colas:
CLEARDATA Actual -> Colas;
Copying Data
The DATACOPY calculation command copies data cells from one range of members to another range of members in a database. The two ranges must be the same size. For example, the following formula copies Actual values to Budget values:
DATACOPY Actual TO Budget;
You can use the FIX command to copy a subset of values. For example, the following formula copies Actual values to Budget values for the month of January only:
FIX (Jan)
DATACOPY Actual TO Budget;
ENDFIX