essbase calculations a visual approach kscope 2010
TRANSCRIPT
Row and Column Intersections
Spreadsheets
store data in
intersections
named using
row numbers
and column
letters
Essbase Uses Business Descriptions
Essbase
names
intersection
using
business
descriptions
Income Statement
ActualJan Feb Mar ... Dec
Sales
Cost Of Sales
Gross Profit
SG&A
Corp. Overhead
Profit Bef. Tax
Tax
Net Income
Two Dimensional Model
100 Dec -> “Net Income”
Three Dimensional Model
Income Statement
Variance
Jan Feb Mar ... Dec
Sales
Cost Of Sales
Gross Profit
SG&A
Corp. Overhead
Profit Bef. Tax
Tax
Net Income
Income Statement
Budget
Jan Feb Mar ... Dec
Sales
Cost Of Sales
Gross Profit
SG&A
Corp. Overhead
Profit Bef. Tax
Tax
Net Income
Income Statement
Actual
Jan Feb Mar ... Dec
Sales
Cost Of Sales
Gross Profit
SG&A
Corp. Overhead
Profit Bef. Tax
Tax
Net Income
25
100
75
Dec -> “Net Income”Actual -> Dec -> “Net Income”100
Five Dimensional Model
“All Region”->”All Products”->Actual->Dec->”Net Income”“All Region”->”All Products”->Actual->Dec->”Net Income”
Three Ways to Specify a Formula
Hierarchy
Member formula
Margin = Sales – COGS;Calc Script
Global Calcs
Sales
Actual->Sales
Jan->Actual->Sales
Underspecification
In a three dimensional database
Jan->NY->Margin
will calculate one cell
Jan->NY-> Margin = Jan-NY-> Sales - Jan->NY-COGS;
• Drop the specification
for the month of
January the formula will
calculate all months.
Underspecification
NY-> Margin = NY-> Sales - NY-COGS;
• Drop the specification for the
state of NY, the formula will
calculate all the months and all
the states
Underspecification
Margin = Sales - COGS
Underspecification
In a three dimensional database
Jan->NY->Margin will calculate one cell
Jan->NY-> Margin = Jan->NY-> Sales
-Jan->NY-COGS;
Fewer co-ordinates increases scope
NY->Margin= NY->Sales
- NY->COGS;
Fewer co-ordinates increases scope
Margin= Sales
- COGS;
Member Coordinates & Implied References
� Every cell reference requires a complete set of co-ordinates (1 for each dim)
� If you omit any co-ordinate Essbase implicitly matches the cell being calculated
Jan->Actual->Margin = Jan->Actual->Sales - Jan->Actual->COGS
Feb->Actual->Margin = Feb->Actual->Sales - Feb->Actual->COGS
Margin = Sales- COGS
Cross-Dimensional Operator
� “->”creates an absolute reference
Vt->Colas->Share = Vt->Colas->Sales % All Markets ->Colas-> Sales
Colas->Share = Colas->Sales % All Markets ->Colas-> Sales
Share = Sales % All Markets -> Sales
Order of Calculation: Dimensions
The Dense Calc
1. Accounts Dimension (requires Accounts Dimension property)
2. Time Dimension (requires Time Dimension property)
3. Remaining Dense Dimension (in Outline Order)
4. Two-Pass Calcs (requires Default Calc containing CALC ALL; )
The Sparse Calc
5. Remaining Sparse Dimensions (in Outline Order)
Order of Calculation: Hierarchy
Calc Order: 1. AccountsJan Feb Mar Qtr1
Measures L - - - -
Profit ~ - - - -
Margin + - - - -
Sales + 678 645 675 -
COGS - 271 258 270 -
Total Expenses - - - - -
Marketing + 94 90 94 -
Payroll + 51 51 51 -
Misc + 0 1 1 -
Ratios L - - - -
Margin % F - - - -
Profit % F - - - -
Load Data
Calc Order: 1. AccountsJan Feb Mar Qtr1
Measures L - - - -
Profit ~ - - - -
Margin + 407 387 405 - 3 Calc Margin for all dense dims
Sales + 678 645 675 - 1 Read Sales Data
COGS - 271 258 270 - 2 Read COGS Data
Total Expenses - - - - -
Marketing + 94 90 94 -
Payroll + 51 51 51 -
Misc + 0 1 1 -
Ratios L - - - -
Margin % F - - - -
Profit % F - - - -
Margin:Consolidate Sales (+) and COGS (-)
Calc Order: 1. Accounts
Jan Feb Mar Qtr1
Measures L - - - -
Profit ~ - - - -
Margin + 407 387 405 - 3 Calc Margin for all dense dims
Sales + 678 645 675 - 1 Read Sales Data
COGS - 271 258 270 - 2 Read COGS Data
Total Expenses - 145 142 146 - 7 Calc Total Expenses for all dense dims
Marketing + 94 90 94 - 4 Read Marketing data
Payroll + 51 51 51 - 5 Read Payroll data
Misc + 0 1 1 - 6 Read Misc. data
Ratios L - - - -
Margin % F - - - -
Profit % F - - - -
Total expenses: Consolidate Marketing (+), Payroll (+) and Misc. (+).
Calc Order: 1. Accounts
Jan Feb Mar Qtr1
Measures L 262 245 259 - 8 Calc Measures for all dense dims
Profit ~ 262 245 259 - 8 Calc Profit for all dense dims
Margin + 407 387 405 - 3 Calc Margin for all dense dims
Sales + 678 645 675 - 1 Read Sales Data
COGS - 271 258 270 - 2 Read COGS Data
Total Expenses - 145 142 146 - 7 Calc Total Expenses for all dense dims
Marketing + 94 90 94 - 4 Read Marketing data
Payroll + 51 51 51 - 5 Read Payroll data
Misc + 0 1 1 - 6 Read Misc. data
Ratios L - - - -
Margin % F - - - -
Profit % F - - - -
Profit: Consolidate Margin (+) and Total Expenses (-)
Calc Order: 1. Accounts
Jan Feb Mar Qtr1
Measures L 262 245 259 - 8 Calc Measures for all dense dims
Profit ~ 262 245 259 - 8 Calc Profit for all dense dims
Margin + 407 387 405 - 3 Calc Margin for all dense dims
Sales + 678 645 675 - 1 Read Sales Data
COGS - 271 258 270 - 2 Read COGS Data
Total Expenses - 145 142 146 - 7 Calc Total Expenses for all dense dims
Marketing + 94 90 94 - 4 Read Marketing data
Payroll + 51 51 51 - 5 Read Payroll data
Misc + 0 1 1 - 6 Read Misc. data
Ratios L 60.0 60.0 60.0 - 9 Calc Margin % for all dense dims
Margin % F 60.0 60.0 60.0 - 9 Calc Ratios for all dense dims
Profit % F 38.6 38.0 38.4 - 10 Calc Profit % for all dense dims
Formulas: Margin % Sales, Profit % Sales
Calc Order: 2. Time
Two-Pass Calcs
� Two-Pass calcs are recalculated to correct for errors created by the default calc order
� Tag members Two-Pass calc in the outline
� Two-Pass calc works on the accounts dim and on dynamic calcs
� If you use a script (other than the default) you must use the CALC TWOPASS; command
Calculation Order Affects Results
Essbase Default Calculation Order
Empty Database
Load Data
Loaded Level 0 Data
The Dense Calc: Accounts
Measures Calculated for NY->Apples Block
The Dense Calc: Periods
Time Dimension Calculated for NY->Apples Block
The Dense Calc: Level 0 Blocks
Dense Calc Completed on Level 0 Blocks
The Sparse Calc: AllMkts
Aggregate AllMkts
The Sparse Calc: AllPdt
Aggregate AllPdt
CALC TWOPASS;
Twopass Calc Completed
Dynamic Calcs
� Calculated on retrieval or as precedent
� Dynamic Calc Non-Store
� Dynamic Calc and Store
� Set in Outline Editor
Advantages of Dynamic Calcs
Without With
Measures 100 60
Periods 17 12
Scenario 4 2
Cells per block 6,800 1,440
Bytes per cell 8 8
Bytes per Block 54,400 11,520
Ratio 21%
Bytes per Block
-
10,000
20,000
30,000
40,000
50,000
60,000
Without With
Dynamic Calc and Store
Empty Database
Loaded Level 0 and Retrieved
Retrieved After New Data is Loaded
Dynamic Calc Rules of Thumb
� Make all dense calcs Dynamic (Non-Store) with 2 exceptions:
� Any member with input data
� If the order makes the calc wrong
� Don’t use Dynamic Calc and Store
� Need Clearblock dynamic to update
Basic Calc Script Commands
CALC ALL; Calculates the database
based on the outline.
CALC DIM (single or
multiple dimensions
listed);
Calculates a single
dimension or multiple
dimensions. If all
dimensions are listed it is
the same as a CALC
ALL; command.
CALC TWOPASS; Forces the calculation of
any member tagged with
the Twopass tag in the
Accounts dimension.
IF & FIX: Controlling Scope in a Calc Script
� You can focus the calc on a subset using FIX statements in a script
� You can test conditions using IF statements
Conditional Logic: IF statements
IF (condition)
commands;
ELSEIF (condition)
commands;
ELSE
commands;
ENDIF;
Conditional Logic: IF statements
� Outline or script
� Script requires calc member block
� Loads and tests each specified member
� Use on dense dimensions
Controlling Scope with FIX
FIX (mbrList)
commands
ENDFIX
� FIX statement cannot calc the “fixed” dim
� Script only - not outline
� Loads only those blocks specified
� Passes thru database once per FIX Statement (un-nested)
� Use multiple fixes on sparse dimensions
FIX(NY)CALC DIM (Measures,Year);
ENDFIX
FIX(NY,NJ)CALC DIM (Measures,Year);
ENDFIX
FIX(NY:CT)CALC DIM (Measures,Year);
ENDFIX
FIX(NY,Apples)CALC DIM (Measures,Year);
ENDFIX
FIX(@CHILDREN(AllMkts))CALC DIM (Measures,Year);
ENDFIX
Hierarchical References
� Relationship Functions obtain Values
� Member Set Functions return a listing of member names
� Booleans perform a test (true/false) based on member names
Relative and Absolute References
Marketing Technologies Group
Fixed (Absolute) References
The cross-dimensional operator (->)creates an absolute reference
Marketing Technologies Group
NY->Colas->Share = NY->Colas->Sales / “Total Markets” ->Colas-> Sales
Colas->Share = Colas->Sales / “Total Markets” ->Colas-> Sales
Share = Sales / “Total Markets” -> Sales
Specifying a co-ordinates overrides the implied match
Implied Relative References
Jan->Margin = Jan->Sales - Jan->COGS
Feb->Margin = Feb->Sales - Feb->COGS
Margin = Sales - COGS
Co-ordinates missing from right side are
“matched” to the left side POV
“Crossing” Dimensions
Crossing 1 dimension
Crossing 2 dimensions
Relationship Functions obtain Values
PARENTVALShare = Sales % @PARENTVAL(“AllMkts”,Sales);
ANCESTVALShare = Sales % @ANCESTVAL (“AllMkts”, 2,Sales);
> 0 = Generation
< 0 = Level
0 = Level
Marketing Technologies Group
@ParentVal( )
@PARENTVAL(dimName [, mbrName])
Share = Sales % @PARENTVAL(“AllMkts” ,Sales );
@AncestVal( )
@ANCESTVAL (dimName, genLevNum [, mbrName])
Share = Sales % @ANCESTVAL (“AllMkts”, 2 , Sales );
genLevNum
> 0 = Generation
< 0 = Level
0 = Level
@MDParentVal()
@MDPARENTVAL (numDim, dimName1, . ... . dimNameX [,mbrName])
Share= Sales/@MDPARENTVAL ( 2 , “All Regions”, “All Products”,Sales ) ;
@MDAncestVal()
@MDANCESTVAL (dimCount, dimName1, genLevNum1. . dimNameX, genLevNumX [,mbrName])
Share=Sales/@MDANCESTVAL ( 2 ,”All Markets”, 2 ,”All Products”, 2 , Sales );
Comparing Relationship Functions
@MDParentVal( dimCount, dimName1.. . dimNameX, mbrName)
@AncestVal ( dimName, genLevNum1, mbrName)
@ParentVal( dimName , mbrName)
@MDAncestVal( dimCount, dimName1, genLevNum1. . dimNameX, genLevNumX ,mbrName)
Hierarchical References Summary Chart
(All Destinations refer to the same value) (All Destinations refer to different values, same relationship)
Sales->Markets
Sales->Markets->Products
@PARENTVAL(dimName, Xmbr)
e.g @PARENTVAL(Markets, Sales)
@ANCESTVAL(dimName,genLevNum,[mbrName])
e.g. @ANCESTVAL(Markets, 2, Sales)
@MDPARENTVAL(numDim,dimName1,…dimNameX,[
Xmbr])
e.g. @MDPARENTVAL(2, Markets, Products,
Sales)
@MDANCESTVAL(numDim,DimName1,GenLevNum1,
…DimNameX,GenLevNumX [,Xmbr])
e.g. @MDANCESTVAL(2, Markets, 2, Products,
2, Sales)
Cross One-Dimension
Cross Multiple Dimensions
ABSOLUTE RELATIVE
Marketing Technologies Group
Cross Dimensional Operations
Allocation Example
Marketing Technologies Group | www.mtgny.com