Database Reference
In-Depth Information
@IALLANCESTORS("Oregon") ;
ENDFIX
ENDFIX
This script is officially dubbed as “Cameron's Aggregation trick.” The script fixes on
the market and product that will be updated. If this were a Planning application, oregon
and 100-10 would be user selections via run time Prompts. once the changes are made,
the ancestors for product 100-10 are aggregated followed by the ancestors of the oregon
market. A separate fix block is required for each dimension that must be aggregated.
I do not expect anyone to take my word that this script arrives at the correct answer.
Instead I will prove it out.
The first part of the script simulates a user changing Sales = 50 for oregon and prod-
uct “100-10.” This command slows the script by about 15%, so never use it in production.
Following the script execution, we could verify that the aggregation worked by running
a few reports, but there is another way. The calculation statement “Set msg detail;” sends
a message to the log showing the sparse member combination for every block that is
updated. Thankfully, Sample.Basic is pretty small making it easy to identify the blocks
that needed to be updated. Look at the application log output below.
Output from @IALLANCESTORS("100-10")
Calculator Information Message: Executing Block - [100], [Oregon],
[Budget]
Calculator Information Message: Executing Block - [Product],
[Oregon], [Budget]
Total Block Created: [0.0000e+00] Blocks
Sparse Calculations: [2.0000e+00] Writes and [9.0000e+00] Reads
Dense Calculations: [0.0000e+00] Writes and [0.0000e+00] Reads
Sparse Calculations: [2.1600e+02] Cells
Dense Calculations: [0.0000e+00] Cells
Calculating in serial
Output of from @IALLANCESTORS("Oregon")
Calculator Information Message: Executing Block - [100-10], [West],
[Budget]
Calculator Information Message: Executing Block - [100], [West],
[Budget]
Calculator Information Message: Executing Block - [Product],
[West], [Budget]
Calculator Information Message: Executing Block - [100-10],
[Market], [Budget]
Calculator Information Message: Executing Block - [100], [Market],
[Budget]
Calculator Information Message: Executing Block - [Product],
[Market], [Budget]
Calculator Information Message:
Total Block Created: [0.0000e+00] Blocks
Sparse Calculations: [6.0000e+00] Writes and [3.3000e+01] Reads
Dense Calculations: [0.0000e+00] Writes and [0.0000e+00] Reads
Sparse Calculations: [6.4800e+02] Cells
Dense Calculations: [0.0000e+00] Cells
In the first section, we see that nine data blocks were read and two written. he written
blocks were 100->oregon->Budget and Product->oregon->Budget. The next section
Search WWH ::




Custom Search