Calculation Scripts:- Session 9
DATACOPY: The DATACOPY command copies a range of data
cells to another range within the database.
Syntax:
DATACOPY mbrName1 TO
mbrName2;
mbrName1, mbrName2 -
Any valid single member name or member combination, or a function
that
returns a single member or member combination.
This command is useful
when you must maintain an original set of data values and perform
changes on
the copied data set, say if we want to copy all data from Version1 to Version2
then
we can use the following syntax:
DATACOPY Version1 TO
Version2;
Lets copy the data
from FY11 Actuals to FY12 Budget. Assume that we have below data
Here is the data copy
script
After executing this
script on above data
Little more about data
copy: if any dimension(s)
represented by the members in source
combination are not represented in
destination combination, then by default the same member
or members from
source are assumed to exist in destination to complete the range. The
reverse is not true. Any dimension explicitly represented in destination
must be represented by
another member of the same dimension in source. To
understand this let have a look at below
example:
Here is the script
Result of this one
will be
Here is Jan is
automatically assume on the as the destination.
Clear Data: The CLEARDATA command clears data values
from the database and sets them
to #MISSING. We can use CLEARDATA to clear
a section of a database. Ex:
CLEARDATA Budget;
CLEARDATA
FY11->Budget;
In
our existing data lets us clear data to clear data of Feb,FY12.
Existing data
Script
After execution of
script
CLEARDATA does not
clear blocks, even if all data values in a block are #MISSING. (This statement
will make more sence after next session).
Clear Block: Just for theoritical purpose, The CLEARBLOCK
command clears blocks of data and sets them to #MISSING.
Examples
CLEARBLOCK ALL;
CLEARBLOCK UPPER;
CLEARBLOCK NONINPUT;
CLEARBLOCK DYNAMIC;
ALL - Clears all data
blocks.
UPPER - Clears all
consolidated level blocks.
NONINPUT - Clears
blocks containing values derived from calculations.
DYNAMIC - Clears
blocks containing values derived from Dynamic Calc And Store member
combinations.
More on blocks in next
session.
Cheers..!!!
Rahul S.
Rahul S.
Comments
Post a Comment