The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
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 Se...
- 3 years ago
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.
ChrisLoran
OneStream Employee
3 years agoThe [Book] function looks like a snippet from the FSK or some consultant solution, and not part of the OneStream foundation.
I assume you want to write to C#Elimination but from a calculation that is running on another C# member. You can't write to another data unit ("push" data), you can only "pull" in Finance Rules. So instead you can test if the calculation sequence is running on the C#Elimination member by doing this:
If api.Pov.Cons.MemberId = ConsMemberId.Elimination Then
Book(si,api, "C#[SomeOtherConsMember]:" & sourceCell, "U4:[SOMECALC]", someDecimal )
End If
- Oscar3 years agoContributor
Thanks for the suggestion. I'm trying to address data issues / eliminations using finance business rules during consolidation to generate the necessary eliminations. There are multiple sample codes online using the some variant of the book function that is correct.
Related Content
- 1 year ago