Calculation Script Concept
Transcript of Calculation Script Concept
-
8/12/2019 Calculation Script Concept
1/4
Essbase Calc Script
Calculation Script Overview
Calculation Script is group of command lines; those are used for calculation. Calculation scripts are text
files that define how to calculate data in the database. In a block storage database, they represent the
second method of calculations after the basic outline calculations. Calculation scripts perform calculations
different from the consolidations and mathematical operations that are defined in the database outline.
For example, you can calculate part of a database or copy values between members.
Because calculation scripts perform specific mathematical operations on member, they are typically
associated with a particular database. You can, however, define a calculation script for use with multiple
databases.
Calculation scripts files have a *.csc extension.
The calculation processes of a single database can use any number of calculation scripts. Oracle
Hyperion Calculation Manager is a new tool which centralizes the development of calculations forHFM, Essbase, and Planning.
Formula
The Measures dimension uses the following formulas:
Margin = Sales COGS
Total Expenses = Marketing + Payroll + Miscellaneous Profit = Margin Total Expenses
Profit % = Profit % Sales
Margin % = Margin % Sales
Profit per Ounce = Profit / @ATTRIBUTEVAL(@NAME(Ounces))
Essbase uses Essbase - Consolidation Operator to calculate the Margin, Total Expenses, and Profit members:
The Margin% formula uses a % operator, which means express Margin as a percentage of Sales.
The Profit% formula uses the same % operator.
The Profit per Ounce formula uses a division operator (/) and a function (@ATTRIBUTEVAL) tocalculate profitability by ounce for products sized in ounces.
-
8/12/2019 Calculation Script Concept
2/4
Calculation Script
1.Unary Operator1. The first and most efficient manner of calculating in Essbase in the outline in through the use
of unary operators.
2. Unary operator calculations are faster than formulas in the outline or in calculation scripts.3. Unary calculation construction providers visibility for drilling down in the accounts
hierarchy, So that you can see where the number originated. Formulas can obscure visibility into the
calculations.
Margin = Sales Expenses
http://2.bp.blogspot.com/--7ijmMX0ZtE/TnA_zcZ73KI/AAAAAAAAAJI/Si3E2hp2_P8/s1600/1.PNGhttp://2.bp.blogspot.com/-UYLc16BBajI/TnBAHWmnO7I/AAAAAAAAAJM/vxiRPBINKlY/s1600/1.PNGhttp://2.bp.blogspot.com/--7ijmMX0ZtE/TnA_zcZ73KI/AAAAAAAAAJI/Si3E2hp2_P8/s1600/1.PNGhttp://2.bp.blogspot.com/-UYLc16BBajI/TnBAHWmnO7I/AAAAAAAAAJM/vxiRPBINKlY/s1600/1.PNGhttp://2.bp.blogspot.com/--7ijmMX0ZtE/TnA_zcZ73KI/AAAAAAAAAJI/Si3E2hp2_P8/s1600/1.PNGhttp://2.bp.blogspot.com/--7ijmMX0ZtE/TnA_zcZ73KI/AAAAAAAAAJI/Si3E2hp2_P8/s1600/1.PNG -
8/12/2019 Calculation Script Concept
3/4
2.Member FormulasMember formula is directly associate formulas with members in the outline. Member formulas execute when you
execute complete outline script.
3.Calculation ScriptCalculation script calculation is the anther method of calculation. Using a calculation script, you can choose
exactly how to calculate a database
IF(EMP_Salary>12000)
Income_Tax=EMP_Salary*0.03;
EndIF;
CALC ALL :Calculates and aggregates the entire database based on the database outline.
Example Calc All
CALC DIM :Calculates formulas and aggregations for each member of the specified dimensions.
Example CALC DIM(Accounts);
CALC TWOPASS;Housekeeping: A range of commands used to copy and clear data or perform other housekeeping functions
on specific sectors of the database (for example, DATACOPYBud Version 1 TO Budget Version 2).
SET AGGMISSG OFF; SET UPDATECALC OFF;
SET CALCPARALLEL 3; SET CALCTASKDIMS 5;
Roll-UpA calculation script with the CALC ALL or CALC DIM functions on specific dimensions rolls up input
data in the outline hierarchy according to the outlines consolidation operators and formulas on members in
the outline. The default calculation script, unless reset to an alternative script, is equivalent to the CALC ALL
command.
Member FormulasData is created or modified for specific members according to formulas associated with
the member either in the outline or in a calculation script.
How to write calculation script?
Create a new calculation script file.
File --> New
http://2.bp.blogspot.com/-JHR_xZr6ohQ/TnBA7GswlEI/AAAAAAAAAJU/-hNaukApFc0/s1600/1.PNGhttp://1.bp.blogspot.com/-lwzAS-qMCxo/TnBAi3g6ycI/AAAAAAAAAJQ/MATd1eog014/s1600/1.PNGhttp://2.bp.blogspot.com/-JHR_xZr6ohQ/TnBA7GswlEI/AAAAAAAAAJU/-hNaukApFc0/s1600/1.PNGhttp://1.bp.blogspot.com/-lwzAS-qMCxo/TnBAi3g6ycI/AAAAAAAAAJQ/MATd1eog014/s1600/1.PNGhttp://2.bp.blogspot.com/-JHR_xZr6ohQ/TnBA7GswlEI/AAAAAAAAAJU/-hNaukApFc0/s1600/1.PNG -
8/12/2019 Calculation Script Concept
4/4
Select Calculation script from script tab
New calculation script can be written in scripting area.
Verify an execute script.
http://3.bp.blogspot.com/-OIVOYEI-LuI/TnBBqYmEHfI/AAAAAAAAAJg/fweRLpWZtK8/s1600/1.PNGhttp://4.bp.blogspot.com/-YTYgyqBs-mA/TnBBadyVp_I/AAAAAAAAAJc/1bQCJ8NO-B0/s1600/1.PNGhttp://3.bp.blogspot.com/-h-uxnHHOhKE/TnBBJbt9hSI/AAAAAAAAAJY/2O15F5yGe7M/s1600/1.PNGhttp://3.bp.blogspot.com/-OIVOYEI-LuI/TnBBqYmEHfI/AAAAAAAAAJg/fweRLpWZtK8/s1600/1.PNGhttp://4.bp.blogspot.com/-YTYgyqBs-mA/TnBBadyVp_I/AAAAAAAAAJc/1bQCJ8NO-B0/s1600/1.PNGhttp://3.bp.blogspot.com/-h-uxnHHOhKE/TnBBJbt9hSI/AAAAAAAAAJY/2O15F5yGe7M/s1600/1.PNGhttp://3.bp.blogspot.com/-OIVOYEI-LuI/TnBBqYmEHfI/AAAAAAAAAJg/fweRLpWZtK8/s1600/1.PNGhttp://4.bp.blogspot.com/-YTYgyqBs-mA/TnBBadyVp_I/AAAAAAAAAJc/1bQCJ8NO-B0/s1600/1.PNGhttp://3.bp.blogspot.com/-h-uxnHHOhKE/TnBBJbt9hSI/AAAAAAAAAJY/2O15F5yGe7M/s1600/1.PNGhttp://3.bp.blogspot.com/-OIVOYEI-LuI/TnBBqYmEHfI/AAAAAAAAAJg/fweRLpWZtK8/s1600/1.PNGhttp://4.bp.blogspot.com/-YTYgyqBs-mA/TnBBadyVp_I/AAAAAAAAAJc/1bQCJ8NO-B0/s1600/1.PNG