05-21-2023 01:23 AM - edited 05-21-2023 01:26 AM
Hi Experts,
I have to eliminate Equity and write elimination portion to NCI account. as part of this firstly i am testing with one of the equity accounts i.e "Sharecapital". For this i have written a rule as below and when i execute no errors as well no results. i do not see any reversal entry in C#Elimination.O#Elimination of source buffer value.
Kindly evaluate and help me if i am missing anything in the rule. even i do not see any record in the source buffer log. but there are records at C#Share for A#Sharecapital account.
Rule >>>>
Case Is = FinanceFunctionType.ConsolidateShare
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
api.ExecuteDefaultShare() ' Default share calculation.
End If
Case Is = FinanceFunctionType.ConsolidateElimination
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
Call NCIElim(si,globals,api,args,pmin)
End If
api.ExecuteDefaultElimination()' Default Intercompany eliminations
End Select
'Sub Procedure
05-21-2023 02:01 AM - edited 05-21-2023 03:43 AM
I‘m not in front of my PC to test it, but I‘m sure, your use of filtermembers creates the problem.
Can you try this:
Api.Data.GetDataBufferUsingFormula("O#Top:C#Share:F#CLOSING:A#CAPITAL")
I also wouldn’t use c#share necessarily as a source for the elimination. It won‘t work, when you need to do an at equity pick up.
BTW, you can only use the [ and ] brackets once, nesting them isn‘t supported.
05-21-2023 02:13 AM
i modified as you suggested =>Dim SourceBufferFilter As DataBuffer = Api.Data.GetDataBufferUsingFormula("FilterMembers(O#Top:F#CLBAL,A#CAPITAL)")
still does not reverse the values in C#Elimination taking from C#Share
Do i need to do any settings in consolidation alogorthm type - Standard/custom/share store/orgby...
05-21-2023 03:40 AM
You have to specify the consolidation dimension, if not, it uses C#Elimination and this dataunit is still empty. Please use C#Translated.
05-21-2023 10:37 PM
Hi ChristianW,
Have modified it accordingly, still I am facing an issue. can you please evaluate the script
Rule >>>>
Case Is = FinanceFunctionType.ConsolidateShare
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
api.ExecuteDefaultShare() ' Default share calculation.
End If
Case Is = FinanceFunctionType.ConsolidateElimination
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
Call NCIElim(si,globals,api,args,pmin)
End If
api.ExecuteDefaultElimination()' Default Intercompany eliminations
End Select
'Sub Procedure
05-22-2023 05:51 AM
Hi ChristianW,
Have modified it accordingly, still I am facing an issue. kindly you please evaluate the script if i am missing some thing to make this work
Rule >>>>
Case Is = FinanceFunctionType.ConsolidateShare
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
api.ExecuteDefaultShare() ' Default share calculation.
End If
Case Is = FinanceFunctionType.ConsolidateElimination
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
Call NCIElim(si,globals,api,args,pmin)
End If
api.ExecuteDefaultElimination()' Default Intercompany eliminations
End Select
'Sub Procedure
05-22-2023 08:19 AM - edited 05-22-2023 08:20 AM
You're filtering by various dimension types (Origin, Cons, Flow, Account) and then in the target destination info you only specify one of them (Origin). The system by default will have marked all members for those dimensions as Common when you used GetDataBufferUsingFormula without extra parameters, and then when you go back to save that buffer, it doesn't know what to use as target members for the dimensions not in the destination info.
I guess what you want, in your case, is to pass the changeIdsToCommonIfnotUsingAll parameter as False, so that source dimensionality is preserved and you can save those datacells back where they came from.
05-22-2023 08:30 AM
Hi JackLacava,
I have set all the common members now. But my C#Share of capital account is not getting eliminated but calculation/Consolidation was successful - Kindly help me in this regard.
Rule >>>>
Case Is = FinanceFunctionType.ConsolidateShare
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
api.ExecuteDefaultShare() ' Default share calculation.
End If
Case Is = FinanceFunctionType.ConsolidateElimination
Dim entity As String = api.pov.entity.Name
Dim entityID As String = api.pov.entity.MemberID
Dim Pown As Decimal = api.entity.percentOwnership(entityID)
Dim Pcon As Decimal = api.entity.PercentConsolidation(entityID)
Dim pmin As Decimal = Pcon-Pown
Dim vMethod As OwnershipType = api.Entity.OwnershipType(entityID)
If Pown > 50.0 And Pown < 100.0 AndAlso vMethod.ToString = "FullConsolidation" Then
Call NCIElim(si,globals,api,args,pmin)
End If
api.ExecuteDefaultElimination()' Default Intercompany eliminations
End Select
'Sub Procedure
05-23-2023 06:05 AM
Hi Exports,
Can I expect some replies on the rule which i have shared above
05-23-2023 07:39 AM
Please keep in mind that these forums are not a replacement for official OneStream Support or training. People (including admins) will respond if and when they have the time and inclination to do so - there is no obligation on anyone to participate or solve problems in any given timeframe.
If you have urgent issues, feel free to contact OneStream Support and they'll be happy to assist.