Forum Discussion

DCarrillo's avatar
DCarrillo
New Contributor III
3 years ago

Out of Balance Calculation

Hi All,

I am trying to get my member formula to calculate an unbalanced balance sheet and I built a Quick View to see the calculation. However, it does not seem to be calculating anything with the member formula. 

 

The following is the member formula under 'Calculation Out of Balance'

 

If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) Then

 

api.Data.Calculate("A#Calc_OOB:U1#Manual_Input:F#EndBalLoad:I#None = A#Total_Assets:F#EndBalLoad:I#Top - A#Total_Liability_Equity:U1#Calculations:F#EndBalLoad:I#Top")

 

End If

Any guidance would be greatly appreciated!

  • MarkMatson's avatar
    MarkMatson
    New Contributor III

    Hi,

    I would try adding all the other dimensions into your '=' formula (except for the data unit dimensions). Then if that works, remove the added dimensions one-by-one to see which one was causing the issue.

    Cheers

  • Mark's approach is generally the approach I take when data doesn't calculate.  Usually, I have a personal list of items to follow to troubleshoot:

    1.  Check that I have Formula Type turned on and not using (Not Used)

    2.  Is my Formula Pass in Formula Type correct?  If I'm troubleshooting, I will move to Formula Pass 16 to make sure that all other dependent calculations are executed before running this calculation.  

    3.  Then, I will run through the process that Mark has provided.  Start with making sure that each data buffer in the mathematic operation executes by itself.  Then put the data buffers back together in the subtraction mathematic operation.  

    On a side note, you are missing the UD1 dimension in this data buffer A#Total_Assets:F#EndBalLoad:I#Top.  UD1#Calculation is defined in 1 source data buffer.  UD1#Manual_Input is defined in the destination data buffer.  

  • NicolasArgente's avatar
    NicolasArgente
    Valued Contributor

    Hi there,

    Does that work : 

    api.Data.Calculate("A#Calc_OOB:U1#Manual_Input:F#EndBalLoad:I#None = SubtractUnbalanced(A#Total_Assets:F#EndBalLoad:I#Top, A#Total_Liability_Equity:F#EndBalLoad:I#Top:U1#Calculations, U1#Calculations")