Calculation Scripts 9

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Calculation Scripts:- Session 1

I have read many time people wondering from where to learn calculation scripts or
Business
Rules; even more important Where to Start!. The First day I saw this question I
thought to write
a blog for the same. My inspiration for this is none other then John Goodwin whom I
admire a
lot.
I assume that the readers who are going to read this one are familiar with basics of
Essbase/Planning. We will be starting from writing easy calculation scripts and there
will hell
lots of things which we will learn gradually. Trust me if know how to write calculation
scripts then
you can write Business Rules as well, Business Rules provides some additional
functionality,
we will talk about this later.
Calculations in Essbase:
Well, there are basically two ways by which we can perform calculation on the data.
1A. Outline Calculations,
1B. Member Formulas,
2. Calculation Scripts.
We try to design our outline in such a way that (Most of the times, exceptions are
everywhere)
first we try to implement our logic using the outline calculations, if its not possible by
outline then
Member formulas and if its not even possible to implement our logic by member
formulas then
calculations scripts comes into picture (This is the basic stuff I am talking about, we
will learn
lots of usage of the same as we go further because if we go in details now it wont
make
sense).
Outline Calculations:- These are the simplest way of calculation, it calculates the
value on the

basis of the hierarchy. Ex:

Here if we calculate Acc1 then it will be sum of Acc1A, Acc1B and Acc1C.
Member Formula:- It allows us to do a bit of complicated calculations, ex if we want
to
implement something like Acc1 = Acc1A + (20% of Acc1B) - (15% of Acc1C), then its
easier to
implement using a member formula.

Calculation Scripts:- If you want to override the outline and member formula
calculations then
we need to write a calculation script. A calculation script can be a function, a
command, a
formula or a series of these that can be run on database or on a portion of database.
Enough of theory, now lets talk something practical.
We all know a simple equation:
Margin = Sales Cost of Goods Sold;
Now how to implement this little equation in Essbase, we will be using all of our three
ways to
implement the same. Lets start with creating an Essbase Application, a database:
In EAS console, Right Click on Applications under Essbase Server, Select Create
Application>Using Block Storage

Or you can Create a application from File->New->Block Storage Option. Enter The
Application Name and hit OK,

A Non Unicode Mode Application's name cant be more then 8 characters (What
is unicode and non unicode later), Once the application is created you will get the
instance and app files at below location:

Now Right Click on the Application name and Select Create Database.

After saving you will get an DB created under Application and .db, .dbb, .esm, .otl,
.tct files created under MyDb folder:

Now double click on Outline, then in right pane right click and use Add child to
Create a
member Account, now right click on account and use available options to Create the
following
outline:

1. Here we have implemented our First scenario and as of now just keep two
dimensions
Account and Period

You might also like