Write and check a calculation
Describe a calculation in plain words, refine it with AI, and check it row by row with a live preview and Explain calc before you save.
The calculation editor is where every calculated field starts. Write a formula yourself, or let AI write one from a sentence, and see exactly what it does to your real rows before it touches a chart.

When to use it
- A metric your data doesn't have. A finance lead types "profit margin as a % of sales" and gets a working formula without knowing the function names.
- Checking an inherited formula. An analyst opens a teammate's field, clicks a row, and reads Explain calc to see how it got that number.
- Tightening a first draft. An ops manager has days to ship, then asks AI to "count business days only" and compares the before and after columns.
- Catching a wrong answer early. A sales manager spots that a margin repeats 18.4% on every row and learns it's an aggregate before it lands on a chart.
If you've ever saved a formula, built a chart and only then found it was wrong, check it here first.
Getting started
- Open an analysis and go to the Fields tab.
- Scroll to the Calculated group and click New calculated field. You can also press ⌘K and run Create calculated field from anywhere in an analysis.
- Give it a Field name, write the Formula, and click Create field (or press ⌘↵).
From chat:
Create a calculated field for days between order date and ship dateGenerate with AI
At the top of the dialog, Generate with AI writes a new formula from a description. Type what you want, like "number of days from order date to ship date", and click Generate formula.

Golden fills in the formula, a one-line explanation of what it does, and the preview. The formula is yours to edit like any other.
Refine with AI
Once there's a formula, a Refine with AI box appears under the operator buttons. Ask for a change, like "make it a percent" or "count business days only", and click Refine.

You see the old formula struck through, a Before column next to the new result, and sometimes a better name with Use this name. Click Keep change to accept it or Discard to go back.
Write it yourself
Refer to fields in square brackets, like [Profit] / [Sales]. In the Formula box, type a function name, [ or @ to get suggestions. The operator buttons under it insert +, -, ×, ÷, parentheses, comparisons (=, ≠, >, <, ≥, ≤) and AND, OR, NOT.
Golden checks the formula as you type and shows Valid when it works. If it isn't, the message tells you what's wrong, such as Unbalanced parentheses.
The panel on the right has Functions, Fields and Templates tabs, with one search box for all three. See Calculation function reference and Start from a calculation template.
Read the preview
Under the formula, the preview runs it on 50 sample rows from your data. The summary line tells you the result type, how many rows came back empty, and the range (for numbers) or the most common values (for text), like On time (33), Late (17).
The table shows the fields your formula uses next to the result. Use the arrows to page through the sample.
If your formula adds rows up (with SUM, AVG and the like), the preview says so: it produces one value per group, so every sample row shows the same number. On a chart, it's worked out for each bar or point.

Explain calc
Click any row in the preview, then Explain calc. Golden rewrites the formula with that row's real values in place of each field and shows the result at the end.

It's the fastest way to see why a row landed in the "wrong" bucket: you can read the dates, the comparison and the answer in one line.
Empty inputs
Empty inputs decides what happens when a field in the formula is blank:
| Option | What it does |
|---|---|
| Keep empty | The result is blank too. |
| Use zero | Blank numbers count as 0 in the calculation. |
It updates the zero-fill guards in the formula. Any blank handling you wrote yourself, like COALESCE, stays as written.
Display format
Display format sets how the result looks everywhere it's used. Field type follows the formula; choose Geographic (and a role like State, Zip code or Latitude) to put a text result on a map.

| Setting | What it does |
|---|---|
| Format | Standard, Currency, Percentage, Duration or Scientific. |
| Decimals | How many decimal places to show. |
| Prefix | Text before the number, like ~. |
| Suffix | Text after the number, like ms. |
Duration shows a number as time, in Seconds, Minutes, Hours, Days, Weeks, Months or Years. The line above the settings shows an example, like Example: 123,456.7%. Text fields have no formatting options.
Do it from chat
Ask the analyst for the field in plain words. It writes the formula, names the field and adds it to your Fields list.
Create a calculated field for profit margin as a percentageAdd a field that labels orders Late when they took more than 4 days to shipChange Days to Ship to count business days onlyFAQ
Does Generate with AI see my data? It sees your field names and types, and writes a formula from them. The preview then runs that formula on your sample rows so you can check it.
Why is every row in the preview the same? Your formula adds rows up. It gives one value per group, so it's worked out for each bar or point on a chart.
Can I edit a field later? Yes. Right-click it in the Fields list and choose Edit Formula. The same dialog opens with the preview and Explain calc.
Is my original data changed? No. A calculated field is worked out from your fields, and the original columns stay as they are.