Calculations
Add fields defined by a formula.
- The formula. Type a field's name in brackets, or insert it from the list.
- What it produces, checked as you type.
Add one
In a report, choose New calculation in the Fields pane. In a model, admins add one while editing. A report’s calculations belong to it and are copied when it is duplicated. A model’s appear for everyone who can use the model.
Measure or dimension
| Property | Measure | Dimension |
|---|---|---|
| Works on | Aggregated values | One row at a time |
| Can refer to | Measures, and aggregates such as sum([List price]) |
Dimensions, and row([measure]) |
| Used as | A value | A group, filter or prompt |
| Example | [Refund amount] / [Net amount] |
if([List price] >= 100, "Premium", "Standard") |
A measure calculation is always recomputed at each level, totals included.
Row values behind a measure
row([Quantity]) is the quantity on one row. With it, a dimension can band a measure’s values:
if(row([Quantity]) >= 3, "Bulk", "Single")
Anyone who can use the model can write this, so a measure doesn’t hide its row values. Use row security if rows must be hidden.
Empty values
Arithmetic with an empty value is empty, and so is division by zero. Use coalesce([Discount], 0) where zero is what you mean. if treats an empty condition as false.
When it is wrong
- The reason, and the character it starts at.
Deleting a calculation, or changing it to another type, is refused while something uses it. The message lists the uses.
Functions are in the formula reference. A worked example is in Margin and rates.

