Skip to main content

Build your own calculations

A get-started guide for Explorers creating their own metrics, no code required. Build them with a few clicks, and each one generates correct AQL and handles Level of Detail for you, so the same definition holds up in every report.

Getting started

This handbook focuses on practical calculation patterns: ratios, filtered metrics, time comparisons, buckets, and other metrics Explorers can build without code. Viewers can open shared dashboards and reports, but they cannot create these calculation fields.

There are two quick ways to open Calculation Builder. For the full orientation, including the catalog, AI-generated metrics, and generated AQL, see Start building with Calculation Builder.

Start from the result table preview

Start from the result table

Explorers1 min

Use this when you are already looking at a result and want to derive a new metric from the value in front of you.

  1. Open a report in exploration mode.
  2. Click a metric or column in the result table.
  3. Choose the calculation you want to create.
Start from the dataset tree preview

Start from the dataset tree

Explorers1 min

Use this when you are building a report from scratch and already know which field should become a metric.

  1. Expand a model in the dataset tree.
  2. Find the field you want to build from.
  3. Open its more-options menu and choose Create metric from this.

Once you know where the builder lives, it helps to understand a few controls that apply across many calculations.

Before you build

Calculation Builder is not a separate formula system. It creates normal Holistics metrics that you can reuse, inspect, adjust, and compose with other calculations.

Most calculations start from a metric you already have. From an existing metric's menu:

  • Choose Create metric from this when you want a new metric based on the current one. For example, build a filtered revenue metric first, then compare that filtered metric against the previous period.
  • Use Duplicate when you want to keep the same shape but change one condition, like duplicating a completed-orders metric and changing the status to refunded.
  • Rename the metric through Label, Name, and Description so it reads clearly in the report.
Create and edit calculations with AI preview

Create and edit calculations with AI

Explorers3 min

Describe a metric in plain language, then refine the result through the same GUI, not raw AQL.

View full guide
  1. Open the calculation menu and choose Generate metrics with AI.
  2. Describe the metric you want in plain language.
  3. Let AI build the metric for you.
  4. Review and adjust the result in the same Calculation Builder.
See the AQL underneath preview

See the AQL underneath

Explorers3 min

Every click writes correct AQL. You do not need to read it, but it is there when you want to verify or extend the metric.

View full guide
  1. Build a metric, such as a filtered revenue metric.
  2. Open the Definition popover on the metric.
  3. Read the exact AQL the GUI action generated.
  4. Use Formula mode when you need to write the expression directly.
Control Level of Detail preview

Control Level of Detail

Explorers5 min

Compute a metric at a different grain than the report: a higher-level total beside detail rows, or a nested aggregate like average orders per customer by age bracket.

View setting
  1. Create a custom grouped metric from any metric, such as an order count.
  2. Set Grouping for aggregation: group only by a grain, or group by all dimensions except some.
  3. Use it for a total beside detail rows, or for an aggregate of an aggregate.
  4. The metric carries its grain into any report and adapts to context.

With that foundation, use the examples below as a menu of common calculations to try.

Core metrics

These are the everyday numbers: a metric scoped to the rows you care about, a ratio, and an aggregation over any field. They cover most of what an Explorer builds day to day.

Filter a metric to a subset

Explorers3 min

Scope one metric to a slice of rows, like an orders metric that counts only delivered orders.

View full guide
  1. Start from any metric.
  2. Choose Create metric from this → Metric controls → Filtered metric.
  3. Set a condition on a dimension, for example an order status.
  4. The filter applies to this metric only, so your other metrics stay untouched.

Build a ratio like Average Order Value

Explorers3 min

Define a ratio like average order value once as one metric divided by another, correct at every grain.

View full guide
  1. Open a metric's menu and choose Arithmetic → Divide.
  2. Pick your numerator metric (say, revenue).
  3. Pick your denominator metric (say, order count).
  4. Format the result as currency.
Aggregate any field preview

Aggregate any field

Explorers2 min

Roll a field up with sum, count, average, median, percentiles, or standard deviation.

  1. Click a numeric field in the table or the dataset tree.
  2. Choose an aggregation such as sum, count, or average.
  3. Reach for median, percentiles, or standard deviation when you need them.
  4. Name the metric so it reads clearly.

Time-based calculations answer how a number is moving. Compare against a past period, accumulate as you go, or run a sliding window to smooth the trend or measure how much it's swinging.

Compare to a previous period

Explorers4 min

Put this quarter next to last, as a value, a change, or a percent, with no self-join.

View full guide
  1. Click the metric you want to compare.
  2. Choose Period over period.
  3. Point it at your date dimension.
  4. Pick the display value, the absolute change, or the percent change.

Accumulate with a running total

Explorers3 min

Turn monthly revenue into cumulative revenue to date, accumulated along your date dimension.

View full guide
  1. Click the metric.
  2. Choose Running total.
  3. Pick the date dimension to accumulate along.
  4. Read the cumulative value building up period by period.

Smooth a trend with a moving average

Explorers3 min

Average a noisy week-to-week line into a readable trend. A trailing window is the classic moving average; a centered window smooths most cleanly.

View full guide
  1. Click the metric on a time-based report.
  2. Choose Moving Calculation.
  3. Keep the function on Average.
  4. Shape the window with Previous and Next: trailing, centered, or leading.

Segment and compare

Sometimes the story is in how the parts stack up against each other. Show each slice as a share of the whole, or group a continuous field into tiers you can compare.

Show each part as a percent of total

Explorers3 min

Read each part as a share of the whole, and choose which whole: the row, the column, or the grand total.

View full guide
  1. Click the metric.
  2. Choose Percent of total.
  3. Pick the Total Value: row, column, or grand total in a pivot; grand or custom in a flat table.
  4. Format the result as a percent.

Bucket values with Case when

Explorers4 min

Turn a continuous field into tiers (the result is a dimension), like grouping customers by age or by spend band.

View full guide
  1. Open the calculation menu and choose Case when.
  2. Add a condition and the value it should return.
  3. Add more conditions for each tier, such as age or spend band.
  4. Set a default value for anything that does not match.

Open Markdown
Let us know what you think about this document :)