This documentation is archived and is not being maintained.

- (Subtract) (MDX)

Performs an arithmetic operation that subtracts one number from another number.

Numeric_Expression - Numeric_Expression


A valid Multidimensional Expressions (MDX) expression that returns a numeric value.

A value with the data type of the parameter that has the higher precedence.

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If one expression evaluates to a null value, the operator returns the result of the non-null expression.

The following example demonstrates the use of this operator.

-- This member returns the increase or decrease
-- in gross profit margin over a month.
WITH MEMBER [Measures].[GPM Delta] AS
(Measures.[Gross Profit Margin]) - 
Measures.[Gross Profit Margin])
  ), FORMAT_STRING = 'Percent'

[Date].[Calendar].[Calendar Year].&[2002], 
[Date].[Calendar].[Month]) ON 0,
[Product].[Category].[Category].Members ON 1
[Adventure Works]
([Measures].[GPM Delta])