Skip to Content
author's profile photo Former Member
Former Member

RUNALLOCATION problem with FACTOR=USING/TOTAL

Hi guys!

I have accounts: A = 100.00 and B = 0.00, B is parent node for B01,B02: B01 = 0.00 B02 = 0.00

I need: B = 100.00 (from A) (B01 = 50.00, B02 = 50.00) (Other question is how can I get something like B01 = 30, B02 =70 etc.) So I use code:

*RUNALLOCATION 
*FACTOR=USING/TOTAL
*DIM X_ACCT WHAT=A;WHERE=BAS(B);USING=<<<;TOTAL=<<<
*DIM P_TIME WHAT=2011.JAN.01;WHERE=<<<;USING=<<<;TOTAL=<<<
*DIM RPTCURRENCY WHAT=USD;WHERE=<<<;USING=<<<;TOTAL=<<<
*DIM P_ENTITY WHAT=XXX;WHERE=<<<;USING=<<<;TOTAL=<<<
*DIM CATEGORY WHAT=XXX;WHERE=<<<;USING=<<<;TOTAL=<<<
*ENDALLOCATION
*COMMIT

and get warning: divided by zero in Allocation (B = 0.00 (B01 = 0, B02 = 0)

when I "remove"

*FACTOR=USING/TOTAL

and run script I get B = 200.00 (B01 = 100.00, B02 = 100.00)

After that I run script again with

*FACTOR=USING/TOTAL

and get correct result B = 100.00 (B01 = 50.00, B02 = 50.00)

What is wrong? How can I fix it? I don't want run script twice without and with FACTOR

Regards,

Maxim

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2011 at 07:50 AM

    I am not sure is it the same prolem or not, but if there are no data, script doesn't work. For example

    ..
    *WHEN P_ENTITY
    *IS AAA
    *WHEN P_TIME
    *IS 2011.JAN.01
    *REC(EXPRESSION=100)
    *ENDWHEN
    *ENDWHEN
    ..

    But if there are any data, script work! Is it possible write data to "empty" element?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Gersh Voldman

      Below code ,copies 1 to all base accounts of B irrespective of hierarchy complexity of B . This logic might be required to run before first run of allocation .As after first run ,there would be some reference data in BAS accounts based on which the subsequent execution of allocation works with out errors .

      *XDIM_MEMBERSET ACCOUNT = BAS(B)
      *WHEN ACCOUNT
      *IS *
      *REC(EXPRESSION =1)
      *ENDWHEN . 
      

      Hope this helps.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.