Understanding Data Units
A Data Unit is the fundamental unit of work in OneStream's Finance Engine. Every time you run a calculation or consolidation, the engine breaks the work into Data Units and processes them individually. Your Finance Business Rule fires once per Data Unit.
What Is a Data Unit?
A Data Unit is defined by the intersection of:
- Entity — Which entity is being calculated
- Scenario — Which scenario (Actual, Budget, Forecast, etc.)
- Time — Which time period
- Consolidation member — Local, Translated, Share, Elimination, etc.
- Parent — Which parent entity in the hierarchy (for consolidation)
Why Data Units Matter
Because your rule fires for every Data Unit, an unguarded rule runs far more often than you might expect. If you have 100 entities, 3 scenarios, and 12 months, that could be thousands of Data Unit executions — and your rule fires for each one.
The single most impactful performance practice is adding guard conditions at the top of your rule to skip Data Units that don't need your logic:
Guard Condition Patterns
Common guard patterns include:
api.Entity.IsBase— Only fire for base (leaf) entities, not parent rollupsapi.Cons.IsLocalCurrency— Only fire at the Local Currency consolidation memberapi.Scenario.Name = "Actual"— Only fire for a specific scenarioapi.Entity.Name.StartsWith("US")— Only fire for entities matching a pattern
You can combine multiple guard conditions to narrow execution further:
Related Content
- Writing Calculations — Learn stored calculation techniques and when to use each approach
- The Finance Rules API — Explore the full API available within your rules