# Build your own calculations > Every calculation an Explorer can build in Holistics without code: aggregations, ratios, time comparisons, running totals, buckets, and more, with correct AQL underneath. export const toc = [ { "value": "Getting started", "id": "getting-started", "level": 2 }, { "value": "Before you build", "id": "before-you-build", "level": 2 }, { "value": "Core metrics", "id": "core-metrics", "level": 2 }, { "value": "Trends over time", "id": "trends-over-time", "level": 2 }, { "value": "Segment and compare", "id": "segment-and-compare", "level": 2 } ]; {/* Built from the shared Hero / CardGrid / Card layout primitives: content lives inline here as markdown plus cards. Section headings are real markdown (##) so the right-rail "On this page" nav is generated automatically. Each card's `media` prop renders an inline thumbnail (video autoplays muted while on screen; images render as-is). `time` shows the estimated time investment; `steps` powers the collapsible "Quick steps" preview, so readers can skim the gist without opening the full guide. Cards deep-link into the Calculation Builder reference (/docs/calculation-builder) and, where relevant, into the AQL reference. */} ## Getting started {#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](/docs/calculation-builder/start-building). Use this when you are already looking at a result and want to derive a new metric from the value in front of you. Use this when you are building a report from scratch and already know which field should become a metric. Once you know where the builder lives, it helps to understand a few controls that apply across many calculations. ## Before you build {#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. Describe a metric in plain language, then refine the result through the same GUI, not raw AQL. 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. 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. With that foundation, use the examples below as a menu of common calculations to try. ## Core metrics {#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. Scope one metric to a slice of rows, like an orders metric that counts only delivered orders. Define a ratio like average order value once as one metric divided by another, correct at every grain. Roll a field up with sum, count, average, median, percentiles, or standard deviation. ## Trends over time {#trends-over-time} 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. Put this quarter next to last, as a value, a change, or a percent, with no self-join. Turn monthly revenue into cumulative revenue to date, accumulated along your date dimension. 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. The same window can do more than smooth. A moving standard deviation gauges volatility, a trailing sum gives a rolling total like trailing 12 months, and a moving min or max tracks running highs and lows. ## Segment and compare {#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. Read each part as a share of the whole, and choose which whole: the row, the column, or the grand total. Turn a continuous field into tiers (the result is a dimension), like grouping customers by age or by spend band.