This content has been marked as final. Show 7 replies
I am trying to find gross wage by using net wage and I found a formula to do that.
So this is the only formula calculating what I want.
If essbase had had something like "do while ..." command , it would be much easier for me to do the iteration depending on a condition instead of using loop.
I need some advice please. I would be really grateful.
Fine, though i dont know much about your requirements & your sturcture.
The one thing I can say is you need to check whether the following statements are resulting TRUE in any case.
IF ("wage"->"wage_type"->"begbalance"==2) /*if wage is net*/
IF (("wage"->"begbalance" - "Net_paid" >=0 ) AND ("wage"->"begbalance" - "Net_paid" <0.000000000001 ))
IF any of the above two IF statements never yield TRUE, your script will keep on looping for 10000 times for each member combination.
The reason the it won't stop is that quit does not get evaluated until the FIX is complete. Everytime you process another person quit gets set to 0. Remember, essbase processes the list of users 10000 times. It does not process a single user 1000 times and then move to the next. When the loop evaluates the quit value is determined by the last person.
The real problem here is that you are thinking procedurally. As you gain more experience you will start to think multi-dimensionally and then the scripting language starts to make sense.
To find a solution, maybe you should post what you are trying to achieve. Someone can probably help you and it will run a heck of a lot faster than loop 10000.
thank you Dave and Krish for the quick answers
Actually , Dave approved something that I was always questioning myself since I become a planning consultant in hyperion.
I was a software developer for years so I am used to pure programming logic. in a way that seems to be an advantage but it also directs me wrong way as in this case. Right now I have no idea what is the transaction sequence when a script runs in essbase.
anyway,after reading the posts I realized I must make some changes in my fix statement. will let you know the result.
I just tried the script below to understand the loop logic.
I expected that the result of the calculation would be wage = 2 but instead I found wage = 10.
I tried this with LOOP(2) too and the result was wage = 19.
it is like when loop = 1 c= 1
when loop = 2 c= 10
when loop = 3 c= 19
I am completely lost in LOOP logic. How does this logic work.