Oscar
3 years agoContributor
C#Elimination
How does one write a calculation where the result needs to land at an intersection that includes C#Elimination. Ideally, I'd want to have a function such as:
Public Sub Book(ByVal si As SessionInfo, ByVal api As FinanceRulesApi, ByVal sourceCell As dataBufferCell, ByVal target As String, ByVal factor As Decimal)
And then call it as
Book(si,api,sourceCell,"U4#SOMECALC:C#Elimination",-0.3563523553)
I'm sorry, I don't think I understand - there are multiple problems with what you're trying to do.
- C#Elimination is not a straightforward member, by default it's managed by the cube consolidation algorithm. If you're writing custom rules for it, you have to use the Custom option on the cube algorithm, and implement everything yourself - something I wouldn't recommend if you're just starting with rules.
- Going cross-dataunit (as you want to do, by targeting a specific Consolidation member) shouldn't be done in a Member Formula on Account/Flow/UD members, but rather in a Custom Calculation function in a Finance Business Rule.
- The left-hand side of the assignment operator "=" is not a cell, but rather a databuffer - a collection of multiple cells. You cannot target individual cells in Calculate (or rather you can, but you need the full POV with all dimensions specified, effectively creating a databuffer with 1 cell).
- If you want to operate at the individual cell level, look up DataBuffer and DataBufferCells snippets. But I would strongly recommend to either read the book OneStream Finance Rules and Calculation Handbook by Jon Golembiewski, or come to the Financial Rules training class.