Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Arithmetic Operators

You can use arithmetic operators in Multidimensional Expressions (MDX) for any arithmetic computations, including addition, subtraction, multiplication, and division.

MDX supports the arithmetic operators listed in the following table.

Operator

Description

+ (Add)

Adds two numbers.

/ (Divide)

Divides one number by another number.

* (Multiply)

Multiplies two numbers.

- (Subtract)

Subtracts two numbers.

^ (Power)

Raises one number by another number.

NoteNote

MDX does not include a function to obtain the square root of a number. To obtain the square root of a number, raise it to the power of 0.5 using the ^ operatior.

The following rules determine the order of precedence for arithmetic operators in an MDX expression:

  • When there is more than one arithmetic operator in an expression, MDX performs multiplication and division first, followed by subtraction and addition.

  • When all arithmetic operators in an expression have the same level of precedence, the order of execution is left to right.

  • Expressions within parentheses take precedence over all other operations.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.