Mixed-Version Calculation Works with Variable but Fails When Referencing Intersection Directly
I'm facing an issue with a mixed-version calculation in OneStream and would appreciate any insights.
Scenario
I have a calculation expression that combines:
- A source intersection from the current cube
- A rate/intersection from a different set of dimensions (different POV)
- Numeric values
When I retrieve the value from the second intersection using api.Data.GetDataCell(...), store it in a variable, and then use that variable in the expression, the calculation works as expected.
Example:
VisualBasic
Dim rates227 As Decimal = api.Data.GetDataCell("A#NFD0227:...").CellAmount
Dim safeExpression As String = _
"A#NFD0161:U1#CreditCardsGen:U8#EOP:T#2026M10:V#Periodic:U2#Modelling_Total:O#Top + $Rates227"
api.Data.Calculate(safeExpression)
Problem
However, when I reference the same intersection directly in the expression, the calculation does not return the expected result.
Example:
VisualBasic
A#NFD0161:U1#CreditCardsGen:U8#EOP:T#2026M10:V#Periodic:U2#Modelling_Total:O#Top
+
A#NFD0227:U1#None:U2#Centrally_Loaded:U8#EOP:T#2026M11:V#YTD:O#Top:F#BS_Movement:E#T30000_Inp:S#Outlook:C#Local
Additional Details
- Both intersections contain data.
- The source account is not Dynamic Calc.
- I verified that
GetDataCell()returns the correct value forNFD0227. - The issue occurs primarily for future periods.
api.Data.GetDataBufferUsingFormula()and direct intersection references seem to return 0 or do not evaluate as expected, while passing the retrieved value through a variable works.- The expression can contain a mix of intersections and numeric values.
Questions
- Are there any limitations in
api.Data.Calculate()when combining intersections from different POVs/versions within the same expression? - Does OneStream evaluate direct intersections differently from variables populated via
GetDataCell()? - Is there a supported approach for handling mixed-version calculations where one component comes from a different Scenario/View/Time intersection?
- Would functions such as
AddUnbalanced()be the recommended approach in this situation?
Any guidance or examples of similar implementations would be greatly appreciated.
