Building measures
A measure is a number that a report aggregates: a total cost, a count of accounts, a 7-day moving average, a change against last month. You build a measure by choosing a calculation and filling in a form. There is no free SQL editor for measures. This page explains what each group of calculations does.
For the complete list with formulas, see Measure, field, and recipe reference. Row-level facts belong in a Transform job or a Charge job. See Choosing where calculation logic belongs.
Author a measure
You add a measure in two places, and each place offers its own list of calculations:
| Where | How | What you can choose |
|---|---|---|
| A cube | On the Fields tab, select Add field, then Add Measure. See Add a field. | The Base measures |
| A view | Select Edit, open Fields, and select New measure. See Working with fields in a view. | The Base measures and every group of calculated measures on this page |
The form asks for the calculation, its inputs, a title and a description, the number format, and the drill-down members. You also choose whether the measure is public or a hidden helper.

In a view, the list continues with Formulas, Time comparisons, Shares and ranking, Rolling and cumulative, and Conditional calculations.

A measure that you create in a view belongs to that view. To share it, see Field scopes and promotion.
Base measures
A base measure is one aggregation that reads source data directly. In the form, these are under Base measures. Every other measure is a calculated measure: a formula, comparison, window, share, ranking, or condition.
| Calculation | What it returns |
|---|---|
| Row count | The number of rows |
| Count unique values | The number of unique values in a source field |
| Sum | The total of a number source field |
| Average | The mean of a number source field |
| Minimum | The smallest value |
| Maximum | The largest value |
| Prepared value | One numeric value that a Transform job already calculated at the exact grain of the cube |
An average of averages gives a wrong number. When each group must count in proportion to its size, use Weighted average. It weights each value by a second measure, such as quantity or hours.
Prepared value or Maximum?
Choose Prepared value when a Transform job already calculated the number, such as a forecast, a score, or a control limit. You select the source field and do not define the formula again. Choose Maximum only when you want the largest value across the rows.
A Prepared value has the grain of the cube. A daily value per service is correct when a query groups by day and service, or filters to one service. A query that combines several days or services does not get a roll-up. If you need one, build it as its own measure.
Measure-level filters
A measure can have its own condition, which limits the rows that it aggregates. "Production cost" can then stand next to total cost in the same report.
To add a sum for one category:
- In a view, select New measure and choose Conditional sum under Conditional calculations.
- Select the numeric Value field, such as cost.
- Under Filter condition, select the text Condition field, such as cost class.
- Set Operator to Equal to (=) and enter the Matching text, such as
PROJECT. - Select Continue, check the overview, and save the measure.
Conditional count works the same way and counts the matching rows.
| Subject | Rule |
|---|---|
| Text fields | Equal to and not equal to. The match is exact, including case and spaces. |
| Numeric fields | Less than, at most, greater than, at least, equal to, and not equal to |
| Empty text | To match an empty string, enter the matching text and clear it again. A missing category matches neither comparison. |
| No matching rows | A conditional sum is empty, not zero. A conditional count is zero. |
| Currency | Select one currency, or group by currency. |
The measure still follows the dates and the filters of the report.
Rolling windows
A rolling window calculates a measure over a range of time that moves or grows. It needs a time dimension.
| Kind | What it does |
|---|---|
| Trailing window | Looks back over a fixed span, such as a trailing 30-day sum |
| Moving average | Calculates a base measure once per time bucket, then averages those values over the window |
| Period-to-date total | Adds up from the start of the month, the quarter, or the year |
A moving average also asks for:
| Field | What to enter |
|---|---|
| Observation grain | The size of one time bucket. An hourly cube offers hour and coarser, a daily cube offers day and coarser. |
| Number of observations | How many buckets the window covers |
| Reset dimensions | The dimensions for which the average restarts. The list can be empty. |
| Missing periods | Exclude them, or treat them as zero |
With daily totals of 30 and 5, a moving average over two observations is 17.5. The number of source rows per day does not matter.
Rolling standard deviation, Bollinger bands, z-scores, control limits, and forecasts are not offered as measures. Calculate them in a Transform job and show them with Prepared value.
Time shifts and period-over-period comparisons
A time shift compares a measure with the same measure in an earlier period: this month against last month, or this period against the same period a year ago.
| Calculation | What it returns |
|---|---|
| Previous period value | The value of the earlier period |
| Change from previous period | The current value minus the earlier value |
| Percent change from previous period | The change as a fraction of the earlier value |
These calculations accept a base measure or a compatible calculated measure.
To compare the current and the prior period in one KPI, use KPI vs prior period on the Guides tab of the view. It sets a date range comparison and creates no helper measures. See The authoring workspace.
Ranking
A ranking measure orders the rows within a group and returns the position of each row. You choose the measure to rank by and the order: highest first or lowest first. Use it for "top N" reports, such as the services with the highest cost in each team.
Multi-stage calculations
Some measures build on other measures.
- Percent of total accepts Sum and Row count measures only.
- Ratio, Difference, previous-period calculations, and Rank accept base measures and compatible calculated number measures.
To keep the field list short, make an intermediate measure a hidden helper.
Value meaning, display, drill-down, and view presentation
These settings change how a measure reads, not what it calculates.
- Value meaning, fraction digits, negative style, and value bands: see Display settings.
- Drill-down members: the dimensions that a reader can expand into.
- KPI thresholds, colors, trend direction, and bucket colors belong to the visualization and can differ between views. See Visualizations.
For monetary values, see Currency values.