Measures

Measures are the numbers your query computes — totals, counts, averages, custom expressions. They appear under the Measures section of the sidebar in Aggregate, Chart, and Highlight modes.

Adding a measure

  1. Click Add Measure. A picker opens listing the measures — the numeric columns — grouped by dataset. With nothing added yet it lists every dataset of the model. Tick Show attributes and times to list the other columns too.

  2. Click a column to add it — for example Price:

    • A measure (numeric) column adds it with its Default Aggregation from the model editor — Sum when the model sets none. You can change the aggregation afterwards.
    • An attribute (categorical) column adds a measure with Count — the number of distinct values, and the only aggregation that makes sense for an attribute. The aggregation control is locked.
    • A time column adds the moment it last happened — Latest. Its aggregation menu offers Earliest, Latest, Count by Day (or Week, Month, Quarter, Year, Hour) and Count of distinct moments — see Measures over a time.
    • A column from another dataset (for example an agency's commission rate while you analyse bookings) works too — Engeene follows the links between datasets.
  3. Drag measures by their handle to reorder.

Opening a measure

Everything a measure can do lives in its row. Only one row is open at a time; drag the handle on the left of a row to reorder.

  1. Click the measure row — Price here — to open it. Click it again to close it.
  2. Aggregation shows what the measure calculates and opens the list of aggregations.
  3. The name field gives the measure a label of your own.
  4. The format picker sets how the number reads — see Number format.
  5. The funnel button, Add filter to this measure, adds a condition that applies to this measure only — see Per-measure filters. The sliders button beside it, Filter by value, keeps only the segments whose result is in a range — see Filtering by a measure's value.
  6. The branching button, Add Sub-Aggregation, adds a second level of arithmetic — see Sub-aggregations.
  7. The bin, Remove Measure, takes the measure out of the visualization.

In a chart the same panel also holds the measure's colour and chart style — see Per-measure style. A measure made from an attribute is always a distinct Count, so its row has no Aggregation menu.

Changing the aggregation

  1. Open the measure row and click Aggregation at the top of the panel — it shows the current choice.
  2. Pick a different aggregation from the list — for example Average. Each less obvious one carries a one-line description.

Choosing Percentile calculates the 95th percentile, shown as P95 on the row.

Aggregation Description Works on
Sum Add all values. Measure
Minimum / Maximum Smallest / largest value. Measure
Average Arithmetic mean. Measure
Median 50th percentile. Measure
Percentile The 95th percentile (P95) — the value 95 % of the values are below. Measure
Variance / Standard Deviation Population variance and standard deviation. The standard deviation shows the measure's decimals; the variance shows twice as many, up to 9. A variance too large to show exactly is reported as an error rather than a wrong number. Measure
Sample Variance / Sample Standard Deviation Sample equivalents (n-1 denominator), with the same decimals. Measure
Range Max − Min, computed for you. Measure
Ratio Each segment's share of the total — its sum divided by the grand total. Empty (—) when the total is zero. Measure
Coefficient of Variation Std Dev / Average. Empty (—) when the average is exactly zero. Measure
Count Number of distinct values. Auto-selected for attribute measures (locked). Attribute

All results are exact — no sampling, no approximation. Median and Percentile take a little longer than the others; use them when you need them.

Count always counts distinct values. There is one counting function, and asking it for "how many customers?" gives you the number of different customers, not the number of rows they appear on. To count rows — "how many orders?" — count the dataset's own ID column: every row carries a different one, so the distinct count of the IDs is the number of rows, exactly, at any size.

Measures over a time

A time column — Booked At, Signed Up At — answers three questions as a measure:

In the menu Answers Example
Earliest The first moment it happened in each group When did each customer first book?
Latest The last moment it happened in each group When was each agency's latest booking?
Count by Day (Week, Month, …) In how many different days (weeks, months, …) it happened On how many days did each channel sell?
Count of distinct moments At how many different moments (to the minute) it happened How many distinct check-in times?
  • Earliest and Latest show a date and time in your time zone (Settings → Time & Locale) — in the table, on a chart's axis and tooltip, and in a CSV export. A group with no time shows an empty cell (—).
  • A Highlight card shows the moment short — Oct 13, 14:00 — and adds the year only when it is not the current one.
  • When every measure is an Earliest or a Latest, the visualization menu dims Pie, Funnel, Treemap and Bullet: a slice, a step, a tile or a bar sized by a moment means nothing. Use a table, a line or bar chart, or a Highlight card. A count of days is a number, so every chart stays on offer for it.
  • A count of days, weeks or months uses the days of your time zone, so an order just after midnight counts on the day it was where you are. A count is never empty: a group with no time counts 0.
  • Every answer is exact, also for a time of a linked dataset (Signed Up At of the customer of a booking), with per-measure filters, a Top N with Other (the Other row counts each day once, even when several of its groups happened on it — beside an ordinary measure such as a sum too) and the total row. When the Top N ranks by an earliest, latest or count of days and an ordinary measure sits beside it, Other needs a single breakdown by a property of the table that measure is computed on; rank by the ordinary measure for any other breakdown.
  • A computed measure can use a count of days, but not an earliest or latest moment — a moment is not a number to add or divide.

Renaming and formatting

Every change applies as you make it — there is nothing further to open and nothing to save.

  1. Open the measure row.
  2. Type a new name into the field at the top — "Revenue" instead of "Sum Price", for example.
  3. Pick a format under it.
  4. On a dashboard, choose what a click on this measure does — Do Nothing on Click is the default.
Field Purpose
Custom name Overrides the default label (e.g. show "Revenue" instead of "Sum Price"). Set in any language; renaming does not change what is computed.
Format Auto Format, Integer, 0–4 decimals, Percent, Compact, or Duration — see Number format.
Units Only for a measure with a unit: one menu — No Units, Same as Model (the model's unit, e.g. kg) and, for a weight, a distance, a data size and the like, Natural (1.53 t, the default), SI Prefixes (1.53 Mg) or a prefix you pick; for a currency, its symbol or its code beside it — see Units.
Do Nothing on Click … One picker for what a click on this measure's cell does on a dashboard. Filter this Dashboard on Click applies a filter to the other visualizations (see Cross-filtering); Open Another Dashboard on Click and Open Web Page on Click open a target, the latter substituting values from the same row — the address shows each value as a named pill (Customer), and the button inside the field inserts one at the cursor.

The same fields appear in a List-mode property's panel.

Color and chart sub-type (Chart mode)

In Chart mode the opened measure row also holds its colour (nine hues, each Normal, Highlighted or Lowlighted), its Bar / Line / Area sub-type, Secondary Axis, value labels and Data Points. Only the controls the current chart type uses are shown. See Chart Options → Per-measure style.

Per-measure filters

  1. Open the measure row and click Add filter to this measure.

  2. Pick a column — for example Cabin Class — or a global saved filter.

  3. Choose the values: hover Economy and click Only to keep just that one.

  4. Click Apply. The condition applies only to this measure; the other measures keep every cabin class.

A measure or a time column gets the same editors a visualization filter does.

Common uses:

  • "Total revenue" + "Revenue from premium customers" in the same chart.
  • "Active users" vs. "Trial users" without rebuilding the query.

Per-measure filters appear inside the measure's row; click one to change or remove it. You can also filter a measure by a column from another dataset — "revenue from customers in France" when country lives on customers and revenue on bookings — the same way you would with a whole-query cross-dataset filter.

Filtering by a measure's value

A per-measure filter narrows the rows a measure counts. Filter by value narrows the segments you see by the measure's result — the airlines whose total price is at least €800, the countries whose order count is between 10 and 100.

  1. Open the measure row and click Filter by value. In Keep, choose Values in the range, or Values outside the range to leave those segments out instead.

  2. Type a Minimum, a Maximum or both, in the units the column shows (€800, not cents). Each bound can include its value or leave it out (Greater than instead of Greater or equal to).

  3. Click Apply.

  4. The measure row shows the filter as one line, such as Value: Greater or equal to 800, and the visualization keeps only the segments in the range. Click the line to change the range or to remove the filter.

Good to know:

  • The filter is applied before Top / Bottom N: the top 5 of the airlines above €800, and Include Others rolls up only the airlines that passed the filter.
  • A segment with no value for the measure is never kept, by either choice.
  • The All row still totals every row your filters match, not only the segments on screen — the same as with Top / Bottom N.
  • It works on a computed measure too, on the value its column shows. While any measure carries a sub-aggregation, Filter by value is not offered.

Computed measures

  1. Click Add Measure.

  2. Choose Computed measure — it is pinned to the top of the list. A new row opens in the sidebar with a pill-based expression editor in it.

  3. Build the expression:

    • References are pills, not syntax. A legend lists your existing measures as clickable chips — click one and it drops into the expression as a labelled pill (e.g. Sum of Price).
    • Type the arithmetic between pills: +, -, *, /, comparisons, parentheses, and numeric literals.
    • + Measure inserts an aggregation of a column that is not in your sidebar (e.g. divide by Sum of Quantity without adding Quantity as a visible measure).
    • Functions — the button inside the expression field lists every function with what it does; pick one and it goes in where the cursor is, ready for its arguments.
    • Prefix and Unit — the unit the result is in, picked from the same list as a measure's unit in the model (or Custom… for a label of your own). Leave it on From the expression and the unit follows from the expression — see Units. Set it when the expression converts: Sum of Duration ÷ 3600 is in hours, and Sum of Price ÷ 1000 in thousands.
  4. Click Add. The row stays open: name the measure in its name field and pick a number format (integer, decimals, percent, compact …) like any other measure's. To change the expression later, open the row, edit it in place and click Update.

If you later remove a measure the expression references, its pill turns into a red broken-reference pill — click it to point it at another measure. Reordering measures never breaks references; pills follow their measure.

Beyond arithmetic, the expression language supports the functions (all in the Functions menu) ABS, SIGNUM, FLOOR, CEIL, ROUND, MIN(a, b, …), MAX(a, b, …), TOTAL(metric) (the unsegmented total, for share-of-total math), IF(cond, then, else), COALESCE, IFNULL, AND, OR, and NOT. Empty (NULL) values follow SQL rules: arithmetic on a NULL yields NULL (shown as an em-dash), and COALESCE/IFNULL substitute a fallback.

Expression Use
Sum of Revenue ÷ Sum of Orders Revenue per order.
(This year − Last year) ÷ Last year Year-over-year growth.
Sum of Revenue ÷ TOTAL(Sum of Revenue) Share of total.
IF(Sum of Revenue > 0, Cost ÷ Sum of Revenue, 0) Guarded ratio.

Computed measures are evaluated after aggregation, so you can mix in any of the base aggregations (Sum, Average, Median, …). They are exact — there is no precision loss versus computing in a spreadsheet — and the result is rounded once, to the precision of its inputs. A ratio of two whole-number counts is therefore a whole number unless you ask for decimals: Clicks ÷ Impressions × 100.0 reads 3.1 where × 100 reads 3. See Decimal precision.

Sub-aggregations (an aggregation of an aggregation)

Some questions have two levels of arithmetic in them. "How many items were sold each day, averaged by sales person?" is a count first and an average second — and doing it in one step gives the wrong number.

A sub-aggregation adds that second level to a measure. It groups the measure by one more property underneath whatever the visualization is already segmented by, then folds that grouping away with a function you choose.

  1. Open the measure row and click Add Sub-Aggregation, beside the filter button.

  2. Pick the property to group by — any attribute, or a time property, from any dataset the query can reach; here Cabin Class. For a time property you then pick the period — Day, Week, Month and so on.

  3. Pick the function that folds it away: Sum, Average, Minimum, Maximum, Count or Median. (Count here counts the sub-groups themselves — how many customers, orders, days the level produced.)

The sub-aggregation appears as a line inside the measure's own row, under a thin separator, showing the property, its dataset and the function. Click that line to open it: you can change the function there, or remove the level without touching the measure.

For the example above: segment by Date, add Count of Item as the measure, then add a sub-aggregation on Sales Person folded with Average. Each day's number becomes "the average, across sales people, of how many distinct items that person sold".

Grouping by a period of time answers "what is our average daily revenue?": add Sum of Revenue, then a sub-aggregation on the order's date at Day, folded with Average. The line in the measure's row reads Order Date — per day. Each day's total is calculated first, then those totals are averaged — so a busy day and a quiet day weigh the same, which is the question. Segment the visualization by Month as well and you get the average daily revenue of each month. The days are the days of your time zone, and a day with no orders is not a day the average counts (there is nothing to fold); orders with no date form one group of their own.

Adding a second one nests inside the first. A measure can hold up to three levels, grouping by at most four properties in total; the innermost level is calculated first and folded outwards. When either limit is reached the Add Sub-Aggregation control is still shown, greyed out, with the reason.

Nesting two levels is not the same as grouping by a pair. "Averaged by sales person, then by region" averages the per-region averages; "averaged per (sales person, region) pair" averages the individual cells. Those are different numbers whenever the groups are different sizes — so a level can group by several properties at once, forming one group that is folded away in a single step. A visualization imported from another tool brings these across as they were written; the level shows its properties joined on one line, because it is one level.

Things worth knowing:

  • A sub-group with no value is skipped, so an empty group never drags an average down. If every sub-group is empty the result is empty (an em-dash), never a fabricated zero.
  • The totals row is calculated over the whole scope, not by folding the per-row values together — those are different numbers, and only the first one is right.
  • The property you group by cannot be one you are already segmenting by (a time property at the same period counts as the same), and it cannot repeat across levels — or within one level's group of properties; those columns are shown greyed out in the picker.
  • A multi-value property cannot be the one you group by. One row can carry several of its values (a booking tagged Beach and Family), so its groups overlap and folding them would count that row more than once. Segment the visualization by the multi-value property instead, and put the sub-aggregation on a single-value one.
  • Not available on computed measures, variables, or the Range / Ratio / Coefficient of Variation aggregations, which are already built out of several numbers.
  • Everything the feature produces is exact, and it round-trips through share links, dashboards, scheduled reports and undo like any other part of a visualization.

Sub-aggregations take longer than a plain measure, so use them when the question genuinely has two levels.

Top / Bottom N

  1. Click the dashed Top or Bottom button.

  2. Pick the measure to rank by — here Price: one of your measures, or a measure you add only for ranking.

  3. The row reads the whole setting back as one line, such as Top 10 of Sum Price. Click the Top 10 row to open it.

  4. Direction — Top keeps the largest values, Bottom the smallest.

  5. Number of items — how many segments to keep.

  6. Include Others — rolls everything past the cut into one Other row.

The title follows every change, so what you see on the row is always what the visualization is doing.

Change Measure in the same panel swaps the ranking measure, and Remove Top/Bottom N takes the limit off.

Include Others rolls everything outside the top N into a single row. It is switched off and unavailable while any measure carries a sub-aggregation — the Others row would have to be folded from numbers that are already folded, which cannot be done exactly. Ranking and trimming to N without Others works normally.

Ranking by a computed measure

The picker offers your computed measures too, in their own group at the top of the list — so you can keep the ten countries with the best revenue per order, not the ten with the most revenue. Those are different ten countries whenever the segments are different sizes, which is usually the point.

  • Pick a computed measure that is already in the sidebar, or build one only for ranking — it is added the same way and simply not shown as a column.
  • The row reads back the same way as any other ranking: Top 10 of Revenue per order.
  • Include Others works normally. The Others row is the expression calculated over the combined totals of everything past the cut — for revenue per order, the total revenue of the remaining countries divided by their total orders. It is never an average of the ratios you dropped, which would not be a revenue-per-order figure at all.
  • Empty values rank last, whichever direction you pick, exactly as they do in the column itself.

Ranking by a computed measure cannot be combined with a measure that carries a sub-aggregation: the numbers a sub-aggregation produces are already folded, so the expression has nothing exact to be calculated over. Explore says so rather than returning an approximate ranking.

Multiple measures, multiple datasets

You can mix measures from any number of datasets in one visualization — Engeene follows the links between them. While you analyse bookings, for example:

  • Sum of the booking Total — from bookings
  • Average of the agency Commission Rate — from agencies
  • Count of the customer Country — from customers

A measure from another dataset counts each of that dataset's rows once, however many rows of the table you are looking at point to it. An agency with a 10 % commission and two bookings and an agency with 4 % and one booking give an Average commission of 7 % — the two agencies, not the three bookings. The totals row follows the same rule: an agency that appears in several rows is counted once in the total, so the total is not the average of the rows above it. An empty value is skipped.

If a measure references a dataset that cannot link from your current selection, Explore says the visualization contains unrelated data and lists the items to remove, instead of running. See Cross-Dataset Analysis.

Building queries outside the app? Expression syntax for computed measures is documented in Computed measures (API).

When a visualization has no room for a measure

A heatmap shades its cells from one measure; a scatter chart has two fixed axis slots. Switching to one of those never deletes the measures that no longer fit — they move behind a yellow ⚠ Missing Measures line in the sidebar (click it to see which), return automatically when you switch back to a visualization with room, and can be swapped for one that stayed with Replace Measure. See what each chart can hold.

← Explore WorkspaceSegments →