Sei sulla pagina 1di 29

Essbase and Planning

Calculation Basics

John A. Booth

Topics

About me
Settings Ready set go
Dense / Sparse Its good to be dense
FIX / ENDFIX Mind the focus
Substitution Variables Be flexible
Block Creation Less is more
A simple calculation
Logs What is it doing
Functions Are your friend

About Me

Infrastructure and Integrations Practice


Leader at Blue Stone International

Co-author of Developing Essbase


Applications: Advanced Techniques for
Finance and IT Professionals

Owner of Metavero LLC (my blog)

Contributor to Network 54 and Oracle


Technical Network forums

Developing Essbase Applications


An Essbase focused book:
Advanced content
Good practices
Some of the biggest Essbase
names
You have to buy it

Products

CUBES A wonderland for data

Diet Cola

118

122

127

Root Beer

1252 1292 1343

Cream Soda

876

887

894

Fruit Soda

533

621

591

Jan Feb Mar


Periods
533 units of fruit soda sold in CA in Jan

Know your Outline


A modified sample basic application

Cross Dims Mind the focus


Essbase has an operator which is called a Cross
Dim
The Cross Dim is usually used on the RHS (Right
Hand Side)
Below we see Growth Rate is associated with No
Product / No Market; the lack of other dimensions for
a given variable on the RHS mean these are assumed
and come from the FIX statement.

FIX / ENDFIX Mind the focus


Proper use of fix can mean the difference between a
slow calc and a fast calc.
The less precise you are the more work the engine
does.

vs

Script/Rule Settings

SET UPDATECALC OFF - Always


@CALCMODE CELL As needed
SET CALCPARALLEL n For Aggregations
SET CALCTASKDIMS n If Pre 11.1.2.2;
setting is automatic in 11.1.2.2+

Substitution Variables
Right click on Server Name
Edit / Variables
Select App / DB
Enter Variable / Value
Click Set
NOTE: Requires admin for Global Vars

Outline Formula or a Script / Rule?


General rule of thumb
Use scripts and rules for complex logic e.g. > 10 lines
Use formulas for simple logic e.g. < 10 lines
Considerations for outline formulas:
Dynamic Calculations and outline order can affect results

Be sure to look at Years, Quarters, and any calculated


YTD values when validating your numbers.
Make use of scripts when the logic is complex or does not play
well with other dynamic calculations

Functions Are your friend


Common member set functions
@Relative use this instead of
@Levmbrs
@Children
@Idescendents
Common boolean functions
@ISMBR
@ISUDA

Prior Time Periods / Shifting


@Prior
@MDShift
Common math functions
@Sum
@Round
@Truncate

Dense / Sparse
The old adage is fix on sparse, if on dense
I like put dense on Left Hand Side
e.g.
FIX(SOME,THINGS,HERE)
DENSE_MEMBER = A * B * C;
ENDFIX

Block Creation
Before our calculation we have no data in FY13

Block Creation Less is more


We execute the script snippet which creates blocks

Block Creation Less is more


Our tie sheet in Excel for this step now shows Budget FY13
Equals Actual FY12

Block Creation Some other thoughts


The 11.1.2.3 release has a function @CREATEBLOCK
Below is a sample macro (Business Rules) to create blocks.
This uses an account called PL0001 which has an alias of
Create Block. The good thing about below method is it will not
over-write data. IT does require an extra account to exist.
/* Create blocks at the lowest level
%Macro_Alloc_CreateBlock(SOURCE,TARGET);
Parm 1: Entity where sales exist
Parm 2: Entity where blocks need to be created )
*/
FIX([AllocVersion],DEP01,@LEVMBRS(Product,0),@LEVMBRS(Distribution,0))
datacopy [parm1]->"4100" to [parm2]->"PL0001";
ENDFIX

Viewing the logs

Viewing the logs

Create assumptions to avoid hard coding

A little more complex


Next we setup a dense equation; notice a member from a dense dimension on the
Left Hand Side (LHS).

A snippet of the new log


The log is a powerful tool to locate slow pieces of your
calculation

Our final tie sheet

It is a good practice to keep a single Excel tab for each major


calculation

Good Script Practices


Never make new scripts in a production environment
It doesnt hurt to quote all members
Always test scripts in a dev environment
Be sure you know what it is going to do before you run it
Use comments

Think about reuse (macros and templates)


Understand concept of block creation and why creating all
blocks is not good

Checking the Syntax


The Syntax checking engine is not always consistent
Between products.
My preference is to use calc scripts to check the basics
if the other tools are providing an error that doesnt quite
make sense

Checking the Syntax (Green Checkmark)

Performance Factors
What you can control?
Dense Calculations; use always
Dynamic Sparse; use with care
Settings e.g. CALCPARALLEL
Caches (index/data/calc)
Outline
Data
Outside of your control
Server (CPUs/ RAM)
Storage Throughput

Basic Cache Tuning


Once you have ran a semi-complex calculation you may view the index and data
Cache hit rates on the Statistics Tab.
Index Hit > 95% is good
Data Cache Hit > 70% is good

Reference and Training Materials


Essbase Documentation
http://www.oracle.com/technetwork/middleware/performance-management/documentation/index.html

Select your version, the Essbase Tab


See the Database Admin Guide (DBAG) and Technical Reference (Tech Ref)

Essbase Forums
Oracle Technical Network (OTN)

https://forums.oracle.com/community/developer/english/business_intelligence/business_intelligence_foundation/essbase

Network 54
http://www.network54.com/Forum/58296/

Essbase Books
Visit Amazon.com and search for Essbase

Potrebbero piacerti anche