Skip to main content

Calculation builder

Overview

A field can be viewed and edited in two modes:

  • GUI mode (calculation builder): an intuitive visual interface to configure a field with just a few clicks.
  • Formula mode: an editor for the AQL (Analytics Query Language) behind GUI, where you can compose more advanced logic.

This page covers calculation builder. For Formula mode, see the AQL docs.

Calculation configuration

Calculation inputs

Inputs define the calculation's logic. Depending on the calculation, an input can be a field, plain text, a number, or a configuration option. See Available calculations for the full list.

Calculation inputs

Field metadata

  • Label: the display name shown to users in reports and exploration.
  • Name: the identifier used to reference the field in other formula.
  • Description: a note explaining what the field represents.
Field metadata

Filter

Add conditions that apply to this field only. If you want to apply a condition for all fields on a viz, use viz conditions.

Example: applying the condition status == 'delivered' on Total delivered orders affects only that field; it doesn't impact other fields such as Total orders.

Field filter

Group by

Create a metric with a customized level of detail (how data is grouped). See level of detail for more. There are two ways to set the grouping.

Group by all dimensions except selected ones: the metric follows the report's dimensions, minus the ones you exclude.

  • Example: set Total orders to group by all dimensions except Country. It totals across countries, so within a continent each gender shows the same total regardless of country.
Group by all dimensions except selected ones

Group only these dimensions: the metric is computed at exactly the dimensions you pick, ignoring the rest of the report.

  • Example: set Total orders to group only by Country. It always aggregates to the country level, no matter which other dimensions the report adds.
Group only these dimensions

Format

Set how the field displays.

Example: format % of total orders as Percent (2 decimals) so a raw 0.2434 reads as 24.34%.

Field format

Backed by AQL

The calculation builder is powered by AQL underneath. If you need a metric with more advanced or custom logic, switch to Formula mode and compose it in AQL.

Learn more:


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