cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Start routine

Former Member
0 Kudos
53

Hello All,

I have to create start routine.

In that i need to calculate addition of 1 keyfigure in cube.....and devide it by other key-figure in cube.

Please tell me ,how to start .

Thanks....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

this looks like an update routine on your key figure instead of a start routine.

Please describe your issue with details...

Olivier.

Answers (2)

Answers (2)

Former Member
0 Kudos

Did it with "cell defination".

Former Member
0 Kudos

Hi,

If you want to do the calculation on one or more than one KF and want to assign the value to another KF , then it is better to use Start routine in update rules.

Here the code will be very simple. You need loop into DATA_PACKAGE and need to code simple instructions.

You may get sample code if you search with <i>DATA_PACKAGE</i> .

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hey,

I want to calculate value which is (Key-figure1) / (Summation of Key-figure 2 ).

I hope u understand my issue.

Can u please suggest code for it.

Thanks.

Former Member
0 Kudos

preeti,

i would recommend doing that calculation in the query designer. storing granular information and summarized information on the same record can be very challenging. in your case, the summation of KF2 can change as more records are added. this is why is should be calculated at runtime instead of load time.

in short, let the OLAP engine do all the complex logic for you.

Former Member
0 Kudos

Thanks John,

Can u please tell me how to write code for that ?

Former Member
0 Kudos

there is no code for that, thats the point. you just need some basic query designer skills.

Former Member
0 Kudos

preeti zinta ,

it's like this

KF1/ SUMCT (KF2)

where SUMCT is the column total of KF2.

Former Member
0 Kudos

Hey Sourav,

But i dont know how to write the code......

Can u please give me some example code...so that i can get idea about the routines.

Thanks.

Former Member
0 Kudos

Hi Preeti,

You can do it in the Query Designer Itself. In the Columns region, You can create a formula and define it the way Saurav has mentioned.

Regards.

Former Member
0 Kudos

there is no code, these calculations are not done in update routines. they are done in the query designer.

if you are not familiar with the query designer, please ask someone on your team or take a BW class.

Former Member
0 Kudos

Hi John,

Its not so easy....I have tried with SUMCT function but it gives addition of keyfigure at report level.....

I want addition of all customers ....whether they are present in report output or not..

Now i am trying it with " Define Cells "...

if anybody has suggestions ....they are welcome...

of course ...points will be awarded....

Thanks.

Former Member
0 Kudos

Hi,

SUMCT gives the subtotal result; SUMRT will give you the report total.

Try with SUMGT which should give the Overall total.

hope this helps...

Olivier.

Former Member
0 Kudos

Hey Olivier,

I have tried all the SUM-- functions.....but couldnt get the result..

Finally i finished it with "cell Defination"...

Thanks all of you ...for your helpful suggestions...

Points are awarded to all.