If Cube returns an error when you save a formula, the message usually points to the exact line and column where parsing failed. This article covers the most common causes and how to fix them.
"An error occurred parsing this formula" at line 1, column 1
Cause: A leading = sign at the start of your formula.
Unlike Excel or Google Sheets, Cube formulas do not begin with =. The formula field already knows you're entering a formula, so the = is read as an invalid token at the first character and parsing halts.
Fix: Remove the = from the start of the formula.
| ❌ Incorrect | ✅ Correct |
|---|---|
=<MONTHS_AGO("Current Assets",1)>-"Current Assets" |
<MONTHS_AGO("Current Assets", 1)> - "Current Assets" |
Parsing errors mid-formula
Cause: Missing spaces around operators (+, -, *, /), or operators placed directly against function brackets or quoted dimension names.
Fix: Add a single space on each side of every operator. Compare:
- ❌
>-"Current Assets" - ✅
> - "Current Assets"
This also makes formulas easier to read and matches the formatting used throughout Common formulas and supported operations.
Dimension name not turning green
Cause: The text inside quotation marks doesn't exactly match a dimension member in your Cube (typo, extra space, wrong casing, or the member doesn't exist).
Fix: When a dimension reference is valid, the background of that text turns green in the Formula field. If it stays uncolored, check the dimension name in the Dimensions section of your Workspace and copy it exactly, including capitalization and spacing.
Quotation marks around dimension members
Cause: Dimension members referenced without quotation marks, or with smart/curly quotes (" ") pasted in from another document.
Fix: Always wrap dimension members in straight double quotes ("). If you copied the formula from Word, Google Docs, or an email, retype the quotes directly in the Formula field.
<MONTHS_AGO> and other time functions
Cause: Using <MONTHS_AGO> (or similar) without the correct rollup logic on the dimension member.
Fix: For any formula using <MONTHS_AGO>, set the rollup logic to Calculate Leaf Values, Then Sum. See Common formulas and supported operations for details.
Quick formula syntax checklist
Before saving, confirm:
- No
=at the start of the formula - Spaces around all operators (
+,-,*,/) - Straight double quotes around every dimension member
- Each quoted dimension name turns green in the Formula field
- Angle brackets
< >wrap function calls like<MONTHS_AGO(...)> - Rollup logic is correct for time-based functions
Still stuck?
Copy the exact error message (including the line and column reference) and contact Cube Support. Including a screenshot and exact copy of the Formula syntax will help them streamline their review.