Formula Errors
Formula problems can occur at several different stages:
Formula Definition │ ▼Syntax Validation │ ├── Fails ──► Correct Formula Syntax │ ▼Dimension Build / Metadata Refresh │ ├── Fails ──► Correct References or Dependencies │ ▼Query Execution │ ├── Refused ──► Correct Unsupported Semantics / Scale │ ▼Calculated Result │ ├── Unexpected ──► Check Context, Solve Order, │ Security, Time Behavior ▼Expected ResultThe most important troubleshooting distinction is that a formula can parse successfully and still be unsuitable for execution.
VALIDATE_FORMULA is a syntax check. It confirms that the formula parses, but it does not prove that every construct in the formula can be executed by the query engine. Always test important formulas with a representative query before putting them into production.
Start with the Exact Formula
Section titled “Start with the Exact Formula”Before changing anything, capture:
- Cube name
- Dimension name
- Member name
- Formula source
- Solve order
- Exact validation, build, or query error
- Query POV that exposed the problem
- Executing Snowflake user
- Approximate time of the failure
When reviewing formulas from the built cube, use FORMULA_SOURCE.
For example:
SELECT DIM_NAME, CHILD, FORMULA_SOURCE, SRC_SOLVE_ORDERFROM CASABASE_CUBE.SHARED_DATA.MYCUBE_DIMENSIONSWHERE FORMULA_SOURCE IS NOT NULLORDER BY DIM_NAME, SORTORDER;FORMULA_SOURCE contains the authored formula. The FORMULA column contains the engine’s internal compiled representation and is not intended for manual reading or editing.
Validate the Formula
Section titled “Validate the Formula”For an individual formula, use VALIDATE_FORMULA.
For example:
CALL CUBE.VALIDATE_FORMULA( 'MYCUBE', 'Margin_Pct', '[Account].[Margin] / NULLIF([Account].[Revenue], 0) * 100', 'VIEW');Use validation to identify parsing and syntax problems before assigning or deploying the formula.
See Formula Validation.
Validation Success Does Not Guarantee Runtime Success
Section titled “Validation Success Does Not Guarantee Runtime Success”A successful VALIDATE_FORMULA result means the formula parses.
It does not mean:
- Every construct is supported by the calculation engine
- Every referenced member exists in the required context
- The formula is free of circular dependencies
- The formula will produce the intended business result
- The query using it is within calculation-scale limits
Conceptually:
VALIDATE_FORMULA │ ▼Formula Parses? │ ├── No ──► Fix Syntax │ └── Yes │ ▼ Test Real Query │ ▼ Supported at Runtime? │ ├── No ──► Rewrite Formula │ └── Yes ──► Validate ResultThis distinction is particularly important for constructs that the parser recognizes but the member-formula execution model deliberately refuses.
Syntax Errors
Section titled “Syntax Errors”If VALIDATE_FORMULA fails, inspect the formula for basic structural problems first.
Common examples include:
- Unbalanced brackets
- Unbalanced parentheses
- Malformed member references
- Incomplete expressions
- Invalid function syntax
- Invalid
CASEstructure - Incorrect multidimensional-reference syntax
Start with the smallest expression that reproduces the error.
For example, simplify:
([Revenue] - [Cost of Sales]) / [Revenue]to:
[Revenue] - [Cost of Sales]and then add the remaining expression back incrementally.
This isolates the part of the formula that cannot be parsed.
Member References
Section titled “Member References”Casabase Cube formulas can reference members directly.
For example:
[Revenue] - [Cost of Sales]They can also reference a member in another dimension:
[PERIOD].[Jan]or a specific multidimensional intersection:
[YEARS].[FY24]->[PERIOD].[Jan]These references are evaluated within the dimensional context of the query.
If a formula fails because of a member reference, verify:
- The member exists
- The dimension exists
- The member belongs to the intended dimension
- The dimension has been rebuilt after relevant metadata changes
- The reference uses current member names
- The multidimensional intersection is valid
Do not assume a display alias is interchangeable with the underlying member name.
Formula References a Newly Added Member
Section titled “Formula References a Newly Added Member”If a formula references a member that was recently added to a dimension definition, confirm that the affected dimension structures have been rebuilt.
Changing formula or dimension metadata does not require reloading fact data, but the relevant dimension structures must reflect the updated metadata before the new formula or member becomes part of the active model.
Circular Dependencies
Section titled “Circular Dependencies”Calculated members can reference other calculated members.
For example:
Gross Profit │ ▼Operating Income │ ▼Operating MarginDependencies are resolved automatically.
However, a cycle is invalid:
Formula A │ ▼Formula B │ ▼Formula C │ └────────► Formula ACircular formula dependencies are detected and rejected rather than being allowed to recurse indefinitely.
If a cycle is reported:
- Identify the members participating in the cycle.
- Determine which dependency is unintended.
- Rewrite that formula to break the cycle.
- Rebuild or refresh the applicable formula metadata.
- Test the affected calculations again.
Do not try to fix a true dependency cycle by changing solve order. Solve order controls precedence; it does not make a circular dependency valid.
Self-References
Section titled “Self-References”A calculated member should not normally reference itself directly because that can create a dependency cycle.
When the formula needs the member’s natural aggregation before applying an adjustment, use the supported:
AGG_SELF()AGG_SELF() returns the natural aggregation for the member carrying the formula without re-entering the member’s formula.
For example:
CASE WHEN ISLEAF(PERIOD) THEN [View].[Periodic] ELSE AGG_SELF()ENDSee Formula Syntax and Common Formula Patterns.
Unsupported Formula Constructs
Section titled “Unsupported Formula Constructs”Some constructs may parse but are not supported in member formulas.
Examples include:
{TOTAL}{TOTAL:DIM}
{PREV}{NEXT}
CHILDREN(...)DESCENDANTS(...)LEAVES(...)MEMBERS(...)SIBLINGS(...)CROSSJOIN(...)
.children.descendants.leaves.members
STRTOMBR(...)Set-based aggregate functions such as SUM, AVG, COUNT, MIN, MAX, MEDIAN, STDDEV, or RANK over member sets are also not part of the supported member-formula model.
If a query fails with one of these constructs, do not repeatedly retry it.
Rewrite the formula using the supported calculation model.
Replacing {TOTAL}
Section titled “Replacing {TOTAL}”{TOTAL} and {TOTAL:DIM} are not supported member-formula constructs.
If a formula requires a total, use an explicit multidimensional reference that pins the applicable dimensions to their required top members.
For example, a percent-of-total pattern can use an explicit tuple for the denominator rather than a generic {TOTAL} token.
Replacing {PREV} and {NEXT}
Section titled “Replacing {PREV} and {NEXT}”{PREV} and {NEXT} are not supported.
Use the supported time-navigation functions:
LAGLEADinstead.
These functions navigate according to the supported time-dimension model.
See Time Navigation.
Set Navigation Belongs in the POV
Section titled “Set Navigation Belongs in the POV”Functions such as:
CHILDREN(...)DESCENDANTS(...)LEAVES(...)MEMBERS(...)SIBLINGS(...)CROSSJOIN(...)represent member-set navigation.
Casabase Cube keeps set selection in the query POV rather than embedding those set operations inside member formulas.
For example, use a POV selection such as:
{"children":"Total Entity"}when the query should return the children of a member.
Do not translate a query-selection requirement into a member formula.
Division by Zero
Section titled “Division by Zero”Protect denominators that can legitimately be zero.
The standard pattern is:
[Account].[NetIncome]/NULLIF([Account].[Revenue], 0)NULLIF converts a zero denominator to NULL, allowing the result to represent no data rather than raising a divide-by-zero condition.
For example:
[Account].[Margin]/NULLIF([Account].[Revenue], 0)* 100Division already treats a missing denominator as NULL, but explicit NULLIF is recommended where the denominator can be zero. Formula validation can warn about division without this guard.
Formula Returns No Data
Section titled “Formula Returns No Data”A formula can be syntactically and structurally valid but still return no data.
Check:
- Whether the referenced members have data at the current query intersection
- Whether a denominator resolves to zero or missing
- Whether the formula explicitly returns
NULL - Whether the POV resolves to the expected dimensional context
- Whether time-navigation references are valid at the requested period
- Whether row-level security removes the required data
Test the underlying stored members separately.
For example:
Calculated Member = No Data │ ▼Query Numerator Separately │ ▼Query Denominator Separately │ ▼Check Referenced IntersectionsIf the underlying stored values are also missing, continue with Query Returns No Data.
Formula Returns the Wrong Value
Section titled “Formula Returns the Wrong Value”An incorrect calculated result does not necessarily mean the parser or calculation engine failed.
Check the formula in this order:
Formula Source │ ▼Referenced Members │ ▼Query POV │ ▼Security Scope │ ▼Dependency Chain │ ▼Solve Order │ ▼Time Behavior │ ▼Expected ResultUse a small, known data intersection when possible.
Avoid validating a complex business formula only at a high-level total. A leaf or narrowly scoped test case is usually easier to reconcile.
Check Solve Order
Section titled “Check Solve Order”Solve order controls precedence when calculated members interact, especially when calculated members from different dimensions intersect.
A higher solve order is evaluated later and takes precedence at the intersection.
For example:
Calculated Member A +Calculated Member B │ ▼Same Cell Intersection │ ▼Solve Order │ ▼Final ResultIf a formula is individually correct but returns an unexpected result when another calculated member is present, inspect the solve orders of both members.
Do not assign arbitrary solve-order values merely to make one test case pass. Determine which calculation should logically take precedence.
See Solve Order & Dependencies.
Solve Order Is Not Dependency Resolution
Section titled “Solve Order Is Not Dependency Resolution”If:
Operating Incomereferences:
Gross Profityou do not necessarily need to assign solve order just because one formula references another.
Casabase Cube resolves formula dependencies automatically. Solve order is primarily for calculation precedence when calculated members interact.
This distinction is important when troubleshooting:
Formula A references Formula B │ ▼Dependency Resolution
Formula A and Formula Bintersect from different dimensions │ ▼Solve OrderCheck Query Grain
Section titled “Check Query Grain”Formula behavior can depend on the grain at which it is evaluated.
Some constructs are meaningful only at particular hierarchy positions or grains. The engine can refuse a request rather than return a misleading value when the requested evaluation is not valid.
If a formula works for a leaf member but fails or behaves differently at an aggregate:
- Determine whether the formula is intended to operate at both grains.
- Review hierarchy-aware logic.
- Consider
ISLEAF(...)or another supported hierarchy test where appropriate. - Use
AGG_SELF()where the aggregate case should fall back to natural aggregation.
See Hierarchy-Aware Functions.
Check Hierarchy-Aware Functions
Section titled “Check Hierarchy-Aware Functions”Casabase Cube supports hierarchy-aware functions including:
ISLEAFISCHILDISDESCISGENISLEVHASUDAThese allow formulas to react to the current member’s hierarchy context.
If a hierarchy-aware formula returns an unexpected value, verify:
- Which member is current
- The member’s actual level or generation
- The intended strict vs. inclusive relationship
- UDA assignments
- Whether the query is at the grain expected by the formula
See Hierarchy-Aware Functions.
Time Navigation Errors
Section titled “Time Navigation Errors”If a formula uses time navigation, verify that:
- The referenced dimension is configured as the appropriate time dimension
- The requested period exists
- Sort order reflects the intended chronological sequence
- The navigation offset is correct
- The query context contains the dimensions required by the calculation
Use supported LAG and LEAD constructs rather than Essbase-style {PREV} or {NEXT}.
See Time Navigation.
Time Balance Is Not Formula Logic
Section titled “Time Balance Is Not Formula Logic”Do not recreate time-balance behavior inside a member formula unless the business requirement actually calls for a custom calculation.
Time-balance behavior is configured through the dimension’s time-balance metadata.
Supported behavior includes:
FLOWLASTFIRSTAVERAGEwith supported skip behavior such as:
NONEMISSINGZEROSMISSING_AND_ZEROSThe effective settings are exposed through the dimension metadata.
If a balance-sheet account is aggregating incorrectly across time, verify its time-balance configuration before rewriting its formula.
Calculated Members on Too Many Dimensions
Section titled “Calculated Members on Too Many Dimensions”The current calculation engine supports calculated members on at most two dimensions in a single query.
A query that exceeds that limit is refused rather than approximated. Broad member selections combined with calculated members can also encounter calculation-scale limits.
If this occurs:
- Use stored members on additional dimensions where appropriate
- Narrow broad member expansions
- Reduce the query to the dimensional grain actually required
- Surface the returned error rather than automatically retrying the same request
This is a query-design constraint, not a syntax error in the individual formula.
Formula Works for One User but Not Another
Section titled “Formula Works for One User but Not Another”Check row-level security before assuming the formula is incorrect.
Formulas are evaluated against the data permitted to the executing user. Users with different security scopes can therefore receive different valid calculated results from the same formula.
For example:
User ANorth America Access │ ▼Permitted Data │ ▼Formula │ ▼Result A
User BGlobal Access │ ▼Permitted Data │ ▼Formula │ ▼Result BThis is especially important for:
- Ratios
- Variances
- Percent-of-total calculations
- Allocations
- Metrics whose denominator spans a broad population
When reconciling results between users, compare their security scope before changing the formula.
See Access Control.
Migrated Essbase or Cloud EPM Formula Fails
Section titled “Migrated Essbase or Cloud EPM Formula Fails”Supported member formulas contained in the native Essbase outline (.otl) can be imported into Casabase Cube.
However, Essbase has a broad calculation language, and not every construct maps directly to the Casabase Cube member-formula model. Migrated formulas should therefore be reviewed and tested, especially when the source uses complex Essbase-specific behavior.
Essbase-specific source syntax can include constructs such as:
@ISMBR@ISCHILD@ISDESC@ISLEV@ISUDA@SUMRANGE@CURRMBR@ISATTRIBUTE
IF / ELSEIF / ENDIF
NONEMPTYTUPLE(...)and Essbase member-range or quoted-arrow syntax.
These constructs are source/import syntax, not syntax that should normally be authored directly as Casabase Cube formulas. Supported constructs are translated during import. Some source functions may require manual translation.
Re-Importing Migrated Formulas
Section titled “Re-Importing Migrated Formulas”During Essbase or Cloud EPM migration, formula translation is normally performed as part of the rebuild/import workflow.
If formula translation problems are corrected in the imported source metadata, formulas can be re-imported for the affected dimension without necessarily repeating the entire migration.
For example:
CALL CUBE.IMPORT_FORMULAS( '<CubeName>', '<DimensionName>');For cubes with formulas across many dimensions, IMPORT_ALL_FORMULAS can refresh formulas across the cube. The migration workflow uses the bulk process automatically during the applicable rebuild flow.
After re-importing, validate representative calculations against the source system.
Formula Changed but Query Still Uses Old Behavior
Section titled “Formula Changed but Query Still Uses Old Behavior”If formula source metadata was changed outside the normal formula-management path, compiled formula metadata may need to be refreshed.
The supported formula workflow includes:
CALL CUBE.REFRESH_FORMULA_METADATA('MYCUBE');for refreshing compiled formula metadata after editing source formulas directly.
If the formula is part of dimension definition metadata, also follow the documented dimension rebuild workflow where applicable.
Avoid manually editing the engine’s compiled FORMULA representation.
Run Health Check
Section titled “Run Health Check”Health Check can identify formula-related problems, including dependency cycles and other formula-health conditions.
Run:
CALL CUBE.HEALTH_CHECK('MYCUBE');Then review non-OK findings:
SELECT *FROM TABLE(RESULT_SCAN(LAST_QUERY_ID()))WHERE STATUS <> 'OK';Formula-related Health Check findings should be addressed before troubleshooting performance or downstream reporting behavior.
The current troubleshooting guidance identifies formula-health conditions including syntax, bracket, CASE, empty-formula, dimension-association, division-safety, and untranslated Essbase syntax problems.
See Using Health Check.
Estimate Formula Cost
Section titled “Estimate Formula Cost”A formula can be correct but expensive.
For a cube with complex formulas, use:
CALL CUBE.FORMULA_COST_ESTIMATOR('MYCUBE');to investigate formula cost when performance is the symptom rather than correctness.
Do not rewrite a correct formula solely because a broad query is slow until you have separated:
Formula Complexity │ +Query Breadth │ +Calculated Dimensions │ ▼Observed Query CostContinue with the performance troubleshooting documentation when the formula is valid but query execution is slow.
Recommended Diagnostic Sequence
Section titled “Recommended Diagnostic Sequence”For a formula problem:
Capture Formula + Exact Error │ ▼VALIDATE_FORMULA │ ├── Fails │ │ │ ▼ │ Fix Syntax │ ▼Check Member References │ ▼Check Dependencies / Cycles │ ▼Check Unsupported Constructs │ ▼Run Representative Query │ ├── Refused │ │ │ ▼ │ Follow Runtime Error │ ▼Check Query Context │ ▼Check Security Scope │ ▼Check Solve Order │ ▼Check Time / Hierarchy Behavior │ ▼HEALTH_CHECK │ ▼Reconcile Expected ResultChange one variable at a time so the cause of the formula problem remains clear.
If the Problem Remains
Section titled “If the Problem Remains”Generate support information for the affected cube:
CALL CUBE.GENERATE_SUPPORT_INFO('MYCUBE');Collect:
- Cube name
- Dimension name
- Member name
FORMULA_SOURCE- Solve order
- Exact validation result
- Exact query error
- Query POV
- Expected result
- Actual result
- Whether the formula was migrated from Essbase or Cloud EPM
- Relevant Health Check findings
- Approximate time of the failure
For migrated formulas, also include the original source formula when available.
Do not include passwords, private keys, authentication tokens, or other credentials.
