Skip to main content
Member
Nov 11, 2026 6:08 AM UTC
Question

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 for NFD0227.
  • 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

  1. Are there any limitations in api.Data.Calculate() when combining intersections from different POVs/versions within the same expression?
  2. Does OneStream evaluate direct intersections differently from variables populated via GetDataCell()?
  3. Is there a supported approach for handling mixed-version calculations where one component comes from a different Scenario/View/Time intersection?
  4. Would functions such as AddUnbalanced() be the recommended approach in this situation?

Any guidance or examples of similar implementations would be greatly appreciated.

1 reply

Member
Nov 12, 2026 5:29 PM UTC

Hi there - 

Is this the exact format of your code? 

Dim safeExpression As String = _

"A#NFD0161:U1#CreditCardsGen:U8#EOP:T#2026M10:V#Periodic:U2#Modelling_Total:O#Top + $Rates227"

If yes, I see two things - 

  1. U8#EOP.T# should be U8#EOP : T# (colon not period)
  2. What is the $Rates227?  Are you trying to reference the rates227 variable?