Combinations of Other Measures
For a calculated measure, the value expression often has the form of a mathematical formula that combines measure expressions. For example:
(MEASURES.[measure A] + MEASURES.[measure B]) * 100
Or:
(MEASURES.[measure A] + MEASURES.[measure B])/MEASURES.[measure C]
More formally, in this expression, you can use the following elements:
-
References to measures.
-
Numeric literals. For example: 37
-
Percentage literals. For example: 10%
There must be no space between the number and the percent sign.
-
Mathematical operators. InterSystems IRIS Business Intelligence supports the standard mathematical operators: + (addition), - (subtraction), / (division), and * (multiplication). It also supports the standard unary operators: + (positive) and - (negative).
You can also use parentheses to control precedence.
For example: MEASURES.[%COUNT] / 100
-
MDX functions that return numeric values, such as AVG, MAX, COUNT, and others.
In addition to the functions already discussed, Business Intelligence supports several scalar functions: SQRT, LOG, and POWER.
Tip:
The MDX function IIF is often useful in such expressions. It evaluates a condition and returns one of two values, depending on the condition. You can use this to avoid dividing by zero, for example.